Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Dynamic or static page?

Quote Reply
Dynamic or static page?
Hi!

How to find out if a user is browsing dynamic or static page?

Currently, I am using "d" to include file into the template.



<%if d eq "1"%>

<%include user_status.html%>

<%else%>

<!--#include virtual="/cgi-bin/page.cgi?p=user_status"-->

<%endif%>




but if the user removes "d" part from ../page.cgi?d=1 there is no way
to include file ...



Thanks!
Quote Reply
Re: [Payooo] Dynamic or static page? In reply to
Mmm. Do a <%GT::Template::dump%> and see what variables are available in dynamic mode, and those available in static. Then, use an 'if' statement to see if a certain tag exists in dynamic mode, and use that as your point of checking.

Does that make sense? Crazy

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] Dynamic or static page? In reply to
Thanks Andy!

I believe I can use "s".

It is only available on static pages, with values 3,4 or 5 (??)

What is "s"? (session?)
Quote Reply
Re: [Payooo] Dynamic or static page? In reply to
I'm not actually sure what it does. Could be a session ID, or maybe just something extra they put in, so that any of GT's plugins can use it. Your guess is as good as mine Tongue

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!