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

XF 1.5 Create custom pages within Xenforo

Discussion in 'Styling and Customization Questions' started by InsertUserNameHere, Apr 12, 2016.

  1. InsertUserNameHere

    InsertUserNameHere New Member

    I've seen sites where they have custom pages without the use of pages. As I'd find this easier to link people and verbally give the url to people. Any idea how to do this?
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    You can use the Pages feature and then a route filter to change it to a URL without pages/ in it.
     
  3. InsertUserNameHere

    InsertUserNameHere New Member

    This site I'm looking at doesn't use pages as I get (The requested page could not be found.) when inserting it in the URL. Wondering how to use the header and footer to create a custom page, so I'm not limited to only html.
     
  4. wang

    wang Well-Known Member

    If you do not want to use the build in pages that come with xenforo, you would need an add-on or custom development to create your own custom pahes.

    Can you post here the link to the custom pages that those sites are using?
     
  5. InsertUserNameHere

    InsertUserNameHere New Member

    Sorry for the late reply. https://www.prestige-gaming.org/rules/
     
  6. Commodore

    Commodore Member

    How did you do your page? I'm looking to put up guild rules just like you did it for my guild...
     
  7. Martok

    Martok Well-Known Member

    Jeremy explained above that you can create custom pages using the Pages feature (it's a Page Node) and then using a route filter to change it to a URL without pages/ in it.

    Have you looked at this option?
     
  8. Commodore

    Commodore Member

    I started to do this but I'm stuck at the "using a route filter to change it to a URL without pages/ in it." part :)

    I found this example. This is what I did. I just dont know what to do next.

    [​IMG]
     
  9. Martok

    Martok Well-Known Member

    ACP search for "Route Filters"
    Create a route filter, then fill in the URLs as appropriate. Examples are given on that page, but assuming that you have currently named your Page as 'rules' and it is found at yoursite.com/pages/rules/ then you would do this:

    upload_2016-10-18_12-8-7.png
     
    meetdilip likes this.
  10. Commodore

    Commodore Member

    But what is the purpose of the route filter in this case? I just want to create a single page -- and link to it in the navbar.

    Page creation is done very poorly in xenforo.
     
    Digital Doctor likes this.
  11. Commodore

    Commodore Member

    Ok here is the page I created. Did I do it right? What do I do next... I dont want to "see" the node. I want a button in the navbar. Once its pressed it goes to a page laying out our guild rules.

    [​IMG]
     
  12. Martok

    Martok Well-Known Member

    The route filter allows you to change the URL. So for example if you created your page, the URL would be yoursite.com/pages/rules/. If you didn't like the fact that /pages/ was in the URL, you could use the route filter to remove it (following my instructions) and the URL would then be yoursite.com/rules/.

    If you want a link in the navbar, currently you will need to either add this manually via template edits or, a better option (and one that I use for my About Us page) is to install the Nodes As Tabs add-on which will then allow you to add the link to the nav bar more easily.

    https://xenforo.com/community/resources/nodes-as-tabs.9/


    The devs are aware that a proper navigation manager is needed and this will be coming in XenForo 2.0.
     
    Commodore likes this.
  13. Commodore

    Commodore Member

    Thank you for the solid answers ! Well I have Custom Tabs installed. I hear thatwill do it too. https://xenforo.com/community/resources/custom-tabs.4117/

    I had that installed... finally I have a use for that add on ;)
     
  14. Commodore

    Commodore Member

    Custom tabs acted weird I had to uninstall.
     
  15. Commodore

    Commodore Member

    This should be SO simple.

    one thing I dont understand. Why do we need an URL if we are placing the html in the 2nd tab (Template HTML)?
     
  16. Martok

    Martok Well-Known Member

    It is! Many people have created custom pages with no problems whatsoever.

    Because every page on the internet requires a URL. That is what you are making when you create a custom page, a unique web page within your site on the internet. As such, it needs to have a URL. So if you give it a URL portion of 'rules', then the page will reside at yoursite.com/rules/
     
  17. Commodore

    Commodore Member

    It is easy, but it is not straightforward.

    Ok I got my Guild Rules button up but now I have a new dilemma. I deleted the other page but the button still remains on the nav bar. How do I get rid of it?

    [​IMG]
     
  18. Martok

    Martok Well-Known Member

    As the button in the nav bar was added by the add-on you used, you'll need to post in the discussion thread for that add-on for support with the issue.
     

Share This Page