Announcement

Collapse
No announcement yet.

Different code in "headinclude" template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lynne
    replied
    Code:
    if (THIS_SCRIPT == 'index') 
    { 
    do something
    } else {
    do something else
    }

    Leave a comment:


  • wynode
    started a topic Different code in "headinclude" template

    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"

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