Announcement

Collapse
No announcement yet.

Variable to identify the home page

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

  • craigl
    replied
    This is in a template, so the bottom code worked. Thank you, I never paid much attention to those script definition variables before, but now they make a lot of sense.

    Leave a comment:


  • Lynne
    replied
    At the top of the php file is a line like this:
    PHP Code:
    define('THIS_SCRIPT''vbcms'); 
    This allows you to use this in a plugin:
    PHP Code:
    if (THIS_SCRIPT == 'vbcms') do something on content.php page only.... 
    or this in a template:
    HTML Code:
    <vb:if condition="THIS_SCRIPT == 'vbcms'">do something on content.php page only.... </vb:if>

    Leave a comment:


  • craigl
    replied
    CMS home page. For that matter the forums home page would be nice too. The idea being that I want to be able to use the VBulletin Ad system to display a banner in the global below nav bar position, but not on the home page of the site. There is no option to exclude the home page, so I will just have to make it part of the code. I could do this in javascript I suppose, but I have bumped into this page awareness variable issue enough times now that I would love to get a server side code solution to the problem.

    Leave a comment:


  • Trevor Hannant
    replied
    Forum Home page, CMS home page...?

    Leave a comment:


  • craigl
    started a topic [CMS] Variable to identify the home page

    Variable to identify the home page

    I need some sort of variable similar to $GLOBALS[forumid] that will allow me to identify the home page of the site in my templates.

    I know that VB has never published a list of variables, however if someone there ever put together a short list of what is available to the $GLOBALS variable that would be a step in the right direction.

Related Topics

Collapse

Working...
X