1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Transferring HTML Navigation Code Issue

Discussion in 'XenForo Questions and Support' started by Rum Runner Entertainment, Jul 18, 2015.

  1. Rum Runner Entertainment

    Rum Runner Entertainment Active Member

    I've been trying transfer some code from my previous style to try and recreate what I've had before, but for some reason, it's giving me this error: "The following templates contained errors and were not saved: navigation: 1) navigation - Line 161: Invalid condition expression". I've looked over the code a couple of times, but I can't seem to find the problem, maybe just skimming to much, not entirely sure.

    Any help would be appreciated.

    Thanks!
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    We would need the entire code to be able to help you, there is an invalid conditional.
     
  3. Rum Runner Entertainment

    Rum Runner Entertainment Active Member

    It's somewhere within this code:
    HTML:
    <!-- Help -->
            <li class="navTab PopupClosed"><a href="https://forums-rumrunnerentertainment.com/index.php?help/" class="navLink">Help</a></li>
           
            <div class="<xen:if is="@uix_removeTabLinks">Menu JsOnly tabMenu<xen:else />{xen:if {$tabs.help.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}</xen:if> helpTabLinks">
                                            <div class="primaryContent menuHeader">
                                                <h3>{$tabs.help.title}</h3>
                                                <div class="muted">{xen:phrase quick_links}</div>
                   
                        </div>
                        <ul class="secondaryContent blockLinksList">
                        <xen:hook name="navigation_tabs_help">
                            <li><a href="https://forums-rumrunnerentertainment.com/index.php?help/smilies">Smilies</a></li>
                            <li><a href="https://forums-rumrunnerentertainment.com/index.php?help/bb-codes">BB Codes</a></li>
                            <li><a href="https://forums-rumrunnerentertainment.com/index.php?help/trophies">Trophies</a></li>
                            <li><a href="https://forums-rumrunnerentertainment.com/index.php?help/terms">Terms and Rules</a></li>
                        </xen:hook>
                        </ul>
                    </div>
                   
    
                </li>
     
  4. RDR

    RDR Well-Known Member

    You close the first <li> on the first line but also seem to try and close it right at the end?

    That's the only thing that jumps out at me
     
  5. Rum Runner Entertainment

    Rum Runner Entertainment Active Member

    I don't think that seems to be the issue. I've just tried that, and I don't seem to get an error, although what I'm trying to achieve with that code, ends up not working.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    If it's not a uix style then you can't use the conditional for it.

    If it is a uix style then you should ask in the style thread.
     
  7. Rum Runner Entertainment

    Rum Runner Entertainment Active Member

    It does indeed happen to be a UI.X style. Thanks Brogan!
     
  8. RDR

    RDR Well-Known Member

    OK, second look here - could it be the use of the quotation marks in this line:

    Code:
    <div class="<xen:if is="@uix_removeTabLinks">Menu JsOnly tabMenu<xen:else />{xen:if {$tabs.help.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}</xen:if> helpTabLinks">
    Change <xen:if is="@uix_removeTabLinks"> to <xen:if is='@uix_removeTabLinks'> may help?
     
  9. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    I think this is the culprit:
    Code:
    {xen:if {$tabs.help.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}
    Either do this:
    Code:
    {xen:if '{$tabs.help.selected}', 'tabLinks', 'Menu JsOnly tabMenu'}
    or this:
    Code:
    {xen:if $tabs.help.selected, 'tabLinks', 'Menu JsOnly tabMenu'}
     
  10. Rum Runner Entertainment

    Rum Runner Entertainment Active Member

    Nope, doesn't work :/.
     

Share This Page