I've setup a Go_To filed in Category DB.
I call this <%Go_To%> somewhere in the categories to direct the user to INTERNAL CATEGORY or EXTERNAL WEBSITE based on what I put as a value in the field.
Now, if I put a value 123 or 12/4/123 in the Go_To field, then the link where I call it from will go to:
<%config.build_root_url%>/<%Go_To%>/index.html .. then becomes
http://www.mydomain.com/12/4/123/index.html which is valid reference to internal category.
but, if I want the link to go to an external site (http://www.yahoo.com/) , then I specify the site URL in Go_To field... but this will cause a dead link
http://www.mydomain.com/http://www.yahoo.com/index.html
My question, what would be the Perl code that I should use inside category.html template to make this work... (I can modify the way I call the Go_To filed... but I do not like this way, then I need to put long URL in the Go_To field...)
something like ...
If the call to an internal page/category (or if it does not start with "http://www") then
<%config.build_root_url%>/<%Go_To%>/index.html
else:
<%Go_To%>
endif;
Thank you
Mark
I call this <%Go_To%> somewhere in the categories to direct the user to INTERNAL CATEGORY or EXTERNAL WEBSITE based on what I put as a value in the field.
Now, if I put a value 123 or 12/4/123 in the Go_To field, then the link where I call it from will go to:
<%config.build_root_url%>/<%Go_To%>/index.html .. then becomes
http://www.mydomain.com/12/4/123/index.html which is valid reference to internal category.
but, if I want the link to go to an external site (http://www.yahoo.com/) , then I specify the site URL in Go_To field... but this will cause a dead link
http://www.mydomain.com/http://www.yahoo.com/index.html
My question, what would be the Perl code that I should use inside category.html template to make this work... (I can modify the way I call the Go_To filed... but I do not like this way, then I need to put long URL in the Go_To field...)
something like ...
If the call to an internal page/category (or if it does not start with "http://www") then
<%config.build_root_url%>/<%Go_To%>/index.html
else:
<%Go_To%>
endif;
Thank you
Mark