Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 10:49 pm EDT

Geeklog Forums

PHP in Header Template


srschram

Anonymous
I am trying to use the following in the header template: <?php if($REQUEST_URI=="/quantum/"Wink { echo ('<meta http-equiv=\'Page-Enter\' content=\'blendTrans(Duration=2.0)\'>'); } ?> The function successfully runs when placed in the body of the page but not in header.thtml. It only fails when looking for an equivalency. If I set the function to != then I get the echo string. Any ideas how to get this to work? I only want the meta tag to show in the homepage, not in any of the subsequent pages. Thanks! --Scott
 Quote

srschram

Anonymous
Well, I couldn't find a solution to evaluating HTTP variables in the header template. I think because the header is called by PHP not by the client, so no HTTP info is passed to the template. I did find a workaround by putting an IF-ELSE statement in the COM_siteHeader in lib.common. By passing 'none' to the COM_siteHeader call like so: $display .= COM_siteHeader('','none'); the MetaTag string gets written to the header only on those pages I want. Thanks to Tony, Mark et.al. for a nice modular design! I am just beginning to fathom how flexible Geeklog's design is. Kudos! -Scott
 Quote

All times are EDT. The time is now 10:49 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content