Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Andy] Check if Internal URL or External URL

Quote Reply
Re: [Andy] Check if Internal URL or External URL In reply to
 
Sorry Andy... maybe I did not clarify it enough...but where would the [Go_To] field value be read... as I am checking the content of this field to see if it has "LINK ID" or a "CATEGORY ID"

The Go_To field is located in the Category db (when I add category to the db, I specify the value of the Go_To field there: Category > Add ).

Shouldn't I be checking the value of the Go_To field!

can I do something like this.. (but I am missing the right code to do that)
Code:

<%if Go_To contains 'ID='%> /* if Go_To is an internal link in links db so the value in Go_To is something like "ID=143" (the link id) */
<a href="<%config.db_cgi_url%>/jump.cgi?<%Go_To%>" target="_blank">

<%elseif Go_To is a number %> /* if Go_To is a numeric value, then that value is the category_id from categories db */
<a href="<%config.build_root_url%>/<%URL%>">

<%else%> /* go to anywhere specified in the Go_To field... like http://www.yahoo.com/
<%Go_To%>
<%endif%>

Thanks much again ..
Mark
Subject Author Views Date
Thread Check if Internal URL or External URL Mark2 5800 Sep 26, 2008, 8:10 AM
Thread Re: [Mark2] Check if Internal URL or External URL
Andy 5716 Sep 26, 2008, 8:17 AM
Thread Re: [Andy] Check if Internal URL or External URL
Mark2 5697 Sep 26, 2008, 9:20 AM
Thread Re: [Mark2] Check if Internal URL or External URL
Andy 5712 Sep 26, 2008, 9:22 AM
Thread Re: [Andy] Check if Internal URL or External URL
Mark2 5697 Sep 26, 2008, 9:52 AM
Thread Re: [Mark2] Check if Internal URL or External URL
Andy 5695 Sep 26, 2008, 10:19 AM
Thread Re: [Andy] Check if Internal URL or External URL
Mark2 5691 Sep 26, 2008, 10:33 AM
Post Re: [Mark2] Check if Internal URL or External URL
Andy 5649 Sep 27, 2008, 12:19 AM