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

How to check if running in dynamic mode...

Quote Reply
How to check if running in dynamic mode...
Is there a quick way to find out if a page is being run in dynamic mode, or static? I was gonna use;

Code:
<%if d%>
stuff
<%endif%>

...simply because d=1 is not going to be defined with the page.cgi call.

TIA.

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 check if running in dynamic mode... In reply to
http://www.gossamer-threads.com/...orum.cgi?post=248275 Wink

"s" is (I believe) Staggered
Quote Reply
Re: [Payooo] How to check if running in dynamic mode... In reply to
Laugh

How the hell did I forget replying to that thread?

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: [Payooo] How to check if running in dynamic mode... In reply to
's' wasn't available for me Frown
I ended up writing a simple global call 'is_dynamic'.

Code:
sub {

my $SELF = $ENV{'SCRIPT_FILENAME'};
if ($SELF =~ /page\.cgi/i) { return $SELF; }

}

Then call it via;

Code:
<%if is_dynamic%>
do something
<%endif%>

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!