Announcement

Collapse
No announcement yet.

conditional for cms home or particular section

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

  • malmazan
    replied
    I was able to make it work with <vb:if condition="$vbulletin->nodeid == 1">

    Leave a comment:


  • Mark.B
    commented on 's reply
    This will require custom coding. For help with this, please ask on www.vbulletin.org, the modification site.

  • malmazan
    commented on 's reply
    I'm also looking for this. Specifically I want to show a widget on the main listing but not the articles themselves (there are thousands so manually selecting a layout is not an option)

  • Lynne
    replied
    Originally posted by briansol View Post
    I've also had no luck with this, on vbcms_page (not custom scripts).
    Have you tried using $_GET['r'] in your conditional for the sections (if that is what you are asking about - $_GET['r'] == '1-Index' ).

    Leave a comment:


  • briansol
    replied
    I've also had no luck with this, on vbcms_page (not custom scripts).

    Leave a comment:


  • Lynne
    replied
    It works in the main template for the page - vbcms_page. If you want it in custom templates, you will have to register any variables you want to use in there after you make sure it is available at that point in the code. For help with that, there is an article over on vbulletin.org. If you need further help with that, then that is also the place to post for help.

    Leave a comment:


  • rmd708
    replied
    Will this work in custom templates? I tried it in a custom template and $html_title is equal to '' (nothing).

    Leave a comment:


  • Lynne
    replied
    You could always use the section title:
    Code:
    <vb:if condition="$html_title == 'Home Page'">hello</vb:if>

    Leave a comment:


  • rmd708
    replied
    P.S. I already tried a conditional "if script = index", but that also applies to all the article pages, since all of them are using content.php. I want to isolate only the homepage.

    Leave a comment:


  • rmd708
    started a topic [CMS] conditional for cms home or particular section

    conditional for cms home or particular section

    I want to display a piece of html code only on the cms homepage. Is there a conditional for this or a conditional for particular sections (like latest articles section, which is the homepage)?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X