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

Unmaintained Add new entries to the Help page

Help, I need somebody. Help, not just anybody. Help, you know I need someone, he-e-elp.

  1. Brogan

    Brogan XenForo Moderator Staff Member

    Brogan submitted a new resource:

    Add new entries to the Help page (version 1.0) - Help, I need somebody. Help, not just anybody. Help, you know I need someone, he-e-elp.

    Read more about this resource...
     
  2. ArnyVee

    ArnyVee Well-Known Member

    Nice...thanks for sharing Paul! :)
     
  3. yavuz

    yavuz Well-Known Member

    How do we create new pages and add them to the help page ? I searched the forum but couldn't find.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Just create a template in the normal way.

    The Terms & Rules section on the Help page for example (help_terms) is this:
    HTML:
    <xen:title>{xen:phrase terms_of_service_and_rules}</xen:title>
    
    <div class="baseHtml">
    
    {xen:phrase terms_rules_text}
    
    </div>

    Hmm, scratch that. It didn't work when I created a template called help_test and added it to the help index using:
    HTML:
    <a href="{xen:link help/test">{xen:phrase test}</a>
    I'll have to look in to that.
     
  5. Anthony Parsons

    Anthony Parsons Well-Known Member

    You can't actually, the above will not work if you are thinking to create a new template and use the above... it won't work.

    Brogan used pages as an example, and when you create a page it gets registered as a page. When you create a template, that doesn't make it a page that is registered in the system to display on its own. It must be registered with something... and until a mod comes along to do this, or XF build it in, the above will only work with Brogans exact example of using a page, not templates.

    Two very different things.
     
    laztrix likes this.
  6. yavuz

    yavuz Well-Known Member

    Ok guys, I simply want to create a page and ad it to help section like brogan did.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Then my first post will suffice.

    To create a Page, do it in the ACP and just check Page for the node type.

    acp_create_node.PNG

    The URL Portion will be the page address, in my case I entered "staff".
     
    laztrix likes this.
  8. dieketzer

    dieketzer Well-Known Member

    ive only now just looked at this.
    if you want to also include the staff page link in the help dropdown pane:

    in template 'navigation'
    find:
    Code:
    <ul class="secondaryContent blockLinksList">
                            <li><a href="{xen:link help/smilies}">{xen:phrase smilies}</a></li>
                            <li><a href="{xen:link help/bb-codes}">{xen:phrase bb_codes}</a></li>
                            <li><a href="{xen:link help/trophies}">{xen:phrase trophies}</a></li>
                        </ul>
    replace with:
    Code:
    <ul class="secondaryContent blockLinksList">
                            <li><a href="{xen:link help/smilies}">{xen:phrase smilies}</a></li>
                            <li><a href="{xen:link help/bb-codes}">{xen:phrase bb_codes}</a></li>
                            <li><a href="{xen:link help/trophies}">{xen:phrase trophies}</a></li>
                        <xen:if is="{$visitor.user_id}">
                            <li><a href="{xen:link pages/staff}">Meet The Staff</a></li>
                        </xen:if>
                        </ul>
     
    Oracle likes this.
  9. Ryan Kent

    Ryan Kent Well-Known Member

    I added this code today. Works great!

    One template editing question. Whenever I make a change I like to comment my code. In other templates I used the format /* comment */ In these templates no matter where I insert that format of comment, the text appears in the page. What format is used to comment my code properly?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    /* */ is for commenting in css files only.

    HTML comments begin with <!-- and end with -->
     
    Oracle likes this.
  11. Ryan Kent

    Ryan Kent Well-Known Member

    and my nit-picky question of the month....

    I notice when I view the Terms and Rules page, it is part of the Help system. It's not simply the path to the page, it's also the left side panel of the page shows the Help menu. When I added my Meet the Staff page, it does not have that section. I could just let it go, but little things like this also help me understand better how XF works so I figure I'll ask...how do I "properly" add this page to Help so that it's path is help/staff, and the left side panel appears?
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

  13. Ryan Kent

    Ryan Kent Well-Known Member

    my apologies, can't believe I missed that...in a 1 page thread lol
     
    Peggy likes this.
  14. James

    James Well-Known Member

    Nice tutorial Paul. You could expand on this and show how to add the links to the sub-navigation and the drop-down on hover over Help.
     
  15. Ryan Kent

    Ryan Kent Well-Known Member

    see dieketzer's post #8 above
     
  16. Brogan

    Brogan XenForo Moderator Staff Member

    I have actually done that on my site but omitted it from the first post for some reason o_O

    I will however update it but as Oracle posted, dieketzer posted the code above.
     
  17. James

    James Well-Known Member

    Yeah, I know how to do it I just figured it would help if it was in the first posting with the rest of the tutorial :)
     
  18. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, I've added it now and also used the latest code including the hook to avoid any confusion.
     
  19. Peggy

    Peggy Well-Known Member

    Very good information, thanks.
     
  20. Wuebit

    Wuebit Well-Known Member

    Can this be done yet? >.>
     

Share This Page