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

How to get a detailed link URL on your homepage?

Quote Reply
How to get a detailed link URL on your homepage?
What tag can I use to get the detailed URL of the 'What's New' index page and the index page of a subcategory on the homepage in such a way that it is not hardcoding the static URL? (i.e. if the page loads through page.cgi - it will show the dynamic version)

For example, I'd like to retrieve the detailed URL link tag for these two pages on my homepage:

/New/index2.html (homepage for What's New)

/Gallery/index2.html (a subcategory just below my homepage)
Quote Reply
Re: [scorpioncapital] How to get a detailed link URL on your homepage? In reply to
You just need to use <%build_root_url%>

So the link to the New page would be

<%build_root_url%>/New/index2.html

and the subcategory

<%build_root_url%>/Gallery/index2.html
Quote Reply
Re: [afinlr] How to get a detailed link URL on your homepage? In reply to
But will this interpret the url as dynamic or static based on the environment under which LSQL is running? For example, I've noticed that if I use the <%URL%> tag or the <%prev%> tag (on the appropriate pages), then if it is static, the link is static and if it is dynamic, the link is dynamic. But this is probably because they are interneral variables.

Is there a global perhaps that can be written to for example to link to the subcategory page (one level up) from a detail page for a link within that category?
Quote Reply
Re: [scorpioncapital] How to get a detailed link URL on your homepage? In reply to
Yes it should be static in a static environment and dynamic if you are using d=1.

I'm not quite sure that I understand the second question. If you want a list of links to the categories which the link is in, try this global:

http://www.gossamer-threads.com/...i?post=249066#249066
Quote Reply
Re: [afinlr] How to get a detailed link URL on your homepage? In reply to
Ok, this worked!



Code:
sub {my $url = shift;if ($ENV{SCRIPT_FILENAME} =~ /page\.cgi/i) {
return "page.cgi?g=" . $url . "/" . $CFG->{build_index} . "&d=1";
} else {
return "/" . $url . "/" . $CFG->{build_index};
}
}


Where $url is the name of your category. Note, only works if category name = directory name.
Quote Reply
Re: [scorpioncapital] How to get a detailed link URL on your homepage? In reply to
Do I sense some copy and pasting from one of my globals there Alex? Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How to get a detailed link URL on your homepage? In reply to
Hehe, couldn't of done it without you - you are one of the top LSQL programs I've met.

To anyone reading, I highly recommend Andy for your projects!
Quote Reply
Re: [scorpioncapital] How to get a detailed link URL on your homepage? In reply to
>>>of the top LSQL programs I've met. <<<

So I'm a program now, huh? LOL!

:)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How to get a detailed link URL on your homepage? In reply to
oops, I mean programmer Smile