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

XF 2.0 Page Nodes (sub navigation) not showing in breadcrumbs

Mr Lucky

Well-known member
#1
I have created a Home page which is a page node, and it has a top level tab

(NB: a new navigation entry, not the default Home you would use for a home page outside the forum)

There are some other pages which I have included in the navigation as child navigation entries. Some are page nodes and one is a help page

I set Home as the root breadcrumb.

The help page shows fine in the breadcrumbs, but the pages that are page nodes do not show.

I think I must be missing something obvious, can any please help?

SafariScreenshot067.png

SafariScreenshot068.png

SafariScreenshot069.png
 

Chris D

XenForo developer
Staff member
#2
I think the "Help" entry is the one that is not showing correctly here.

If the node tree looks like this:

Home
|_ About
|_ Fundraising

... then you wouldn't see About or Fundraising in the breadcrumb when they are selected. Generally the last item of the breadcrumb should be "up one level" so only displaying "Home" in those cases is correct.

What I'm not clear on though is where the "Help" node/page actually sits in the tree. At a guess it's maybe something like this:

Home
|_ About
|_ Fundraising
|_ Help
|___ Guide to Using the Forum

If you can demonstrate the bigger picture of the node tree then that will help.
 

Mr Lucky

Well-known member
#3
You mean the Navigation Tree?

The three pages are all at the same level (i.e. one level below top)

SafariScreenshot070.png

I agree the current page does not need to show in the breadcrumbs as obviously a link is not necessary, and the title supplies the final crumb: the info that the user needs to know where they are.

The Help Entry is just one of the help pages with the navigation title Help. I didn't add them all as they have their own sidebar nav and that seems to work with less clutter in the navigation
 

Chris D

XenForo developer
Staff member
#4
I actually meant the node tree.

Clicking help loads a page with a title of “Guide to using the Forum” so where does that sit in relation to all of those other pages?
 

Mr Lucky

Well-known member
#5
I actually meant the node tree.

Clicking help loads a page with a title of “Guide to using the Forum” so where does that sit in relation to all of those other pages?
That page is not in the Node Tree as it's a custom Help Page. The other two pages are node pages at the top level of the node tree.

Both the page nodes and all help pages reference the Home nav ID:

Code:
<xf:page option="section">home_pages</xf:page>
 

Chris D

XenForo developer
Staff member
#6
This is sort of expected because the help breadcrumb is hard coded. I wouldn't necessarily say this is wrong, either, because we don't actually have a navigation tab for Help pages by default, but it's still useful to force "Help" into the breadcrumb so you can at least more easily get back to the Help index.

So there isn't really a workaround I can suggest other than perhaps having this page as an actual page node, rather than being in the help system.

There is a way to have the best of both worlds, perhaps.

If your help page ID is (for example) guide then the content you wrote in that help page is in a template called _help_page_guide.

Your new page node could just contain the content:
HTML:
<xf:include template="_help_page_guide" />
That will render the help page content inside your page node.

For page nodes, you probably don't need to use the <xf:page option="section">home_pages</xf:page> line. You can control the selected navigation tab when editing the node itself.