Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Pass a variable to home.html in the URL?

Quote Reply
Pass a variable to home.html in the URL?
Can I pass a variable to my Links SQL home page template (home.html) via the URL? Eg, if someone goes to www.mysite.com?name=fred, I want my home page to display Hello Fred.

I've tried setting a global called name which does sub {return param('name')}, and then referring to a <%name%> within my template, but I get a compile error when trying to do a full build.

Anyone know how to do this? I've had a request to customise my site via this method and would like to get it working.

Quote Reply
Re: [RobSchifreen] Pass a variable to home.html in the URL? In reply to
You can use any extra tags. The Template parser picks then up intelligently, and lets you use them. I.e if I use;


... I would then have access to all the normal tags, as well as;


Hope that makes sense :)


Andy (mod)
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!