XF 2.2 Change a 'Page' node to not be under 'Forums' in the breadcrumb?

Kevin

Well-known member
When creating a new 'page' node I have the parent node as none but when I view the page the breadcrumb shows it as being under /forums instead of just home /. Is that something I can change?

1697136656555.webp
 
Solution
I don't think the 'Help' pages support stuff like the child/siblings hierarchy though, right?

They don't, which is one of the nice features of pages.

I do find them useful for single help pages though, but if you need to nest, then page nodes would be better.

Removing breadcrumbs is probably the best solution, which is what I used to do when I used them.
You can also highlight a specific tab if needed by adding this to the template code:

HTML:
<xf:page option="section">navigation_ID</xf:page>
I wasn't able to do anything like this either for a page, although I'm sure it can be done if you use a callback instead of the default settings. In my case, I simply removed the breadcrumbs from my custom pages all together using this: <xf:css>.p-breadcrumbs{display:none}</xf:css>

If you want to simply hide everything except the first breadcrumb (home in your case), you could use something like this: <xf:css>.p-breadcrumbs li:not(:first-child){display:none}</xf:css>
 
I wasn't able to do anything like this either for a page, although I'm sure it can be done if you use a callback instead of the default settings. In my case, I simply removed the breadcrumbs from my custom pages all together using this: <xf:css>.p-breadcrumbs{display:none}</xf:css>

If you want to simply hide everything except the first breadcrumb (home in your case), you could use something like this: <xf:css>.p-breadcrumbs li:not(:first-child){display:none}</xf:css>
Thanks! I'll give that a try tonight. In my case, I'd really like to use the functionality of pages to create some /help pages but I'll go with it being under home instead.
 
Thanks! I'll give that a try tonight. In my case, I'd really like to use the functionality of pages to create some /help pages but I'll go with it being under home instead.

You could also just hide the 2nd breadcrumb (Forums) with this: <xf:css>.p-breadcrumbs li:nth-child(2){display:none}</xf:css>. Then you'd be able to add more breadcrumbs with <xf:breadcrumb> for others that you want on each page. At least I'm thinking that'd work. Haven't tested it to know for sure.
 
route filters?
Since I'm going to have several child nodes I don't know I would have to a filter for every single page or if there is a way of doing it in just one spot. Hhhhmmm.
In Basic options you have root breadcrumbs. have you tried changing that?
I forgot all about that option. Just tried it, no matter which I choose the page still shows up under /forums in the breadcrumb (which is actually weird since if choose 'members' as the home route it ends up being members => forums => {page}).
 
I'd really like to use the functionality of pages to create some /help pages

Do you want them to be in the same place as the core help pages?
If so, you can add them here: admin.php?help-pages/ .

Page nodes are the same as forums in code so do appear under the forums route.
 
Do you want them to be in the same place as the core help pages?
If so, you can add them here: admin.php?help-pages/ .

Page nodes are the same as forums in code so do appear under the forums route.
I don't think the 'Help' pages support stuff like the child/siblings hierarchy though, right?

Thinking out loud to myself... having the page nodes nodes content I'm thinking of instead be help pages would likely be easier in the long run, then I wouldn't have to remember anything I may have to take into account during future updates. Hhhhhhmmmm.
 
I don't think the 'Help' pages support stuff like the child/siblings hierarchy though, right?

They don't, which is one of the nice features of pages.

I do find them useful for single help pages though, but if you need to nest, then page nodes would be better.

Removing breadcrumbs is probably the best solution, which is what I used to do when I used them.
You can also highlight a specific tab if needed by adding this to the template code:

HTML:
<xf:page option="section">navigation_ID</xf:page>
 
Solution
Thanks for the ideas & solutions, guys. 😎

It's been some time since I played with page nodes so I think I'll go down that path and see how it goes with the input given. 👍
 
Back
Top Bottom