Different code in "headinclude" template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wynode
    Senior Member
    • Aug 2004
    • 329
    • 3.0.3

    Different code in "headinclude" template

    Just wondering if there is a conditional that can be used to have different code in the headinclude template depending on whether a user is browsing the main page (ie www.thesite.com) or any one of the other pages (ie www.thesite.com/forum/showthread....).

    I've found some PHP conditionals but unfortunately this is not supported in a template.

    PHP Code:
     <?php 
    $uri 
    $_SERVER['REQUEST_URI']; 
    if (
    $uri == "/") { 
          echo 
    "You're on the homepage"
    } else { 
         echo 
    "You're on an internal page"

    ?>
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    Code:
    if (THIS_SCRIPT == 'index') 
    { 
    do something
    } else {
    do something else
    }

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...