• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Nodes As Tabs (with tab selection)

Status
Not open for further replies.
One question, with this mod, doesn't this remove the ability to "hide" a node and only display it where you want? Essentially you can't have a custom page where you link to the nodes in a format you want, because this will display those nodes in the navbar if the hide is unchecked.

Would it be possible to have a new checkbox "Include in Navbar" instead of reusing the current "hide"? This would enable full functionality and not really change the functionality of the existing "hide" checkbox for nodes.

Unless I'm completely missing something (entirely possible).
 
Yea, starting to see holes in this. For example I have the privacy policy page created and do not want that anywhere in my node list. Yet I have to put it in there in order to keep it out of the navigation now. Might have been better to make a new option entirely as opposed to use the node display option.
 
One question, with this mod, doesn't this remove the ability to "hide" a node and only display it where you want? Essentially you can't have a custom page where you link to the nodes in a format you want, because this will display those nodes in the navbar if the hide is unchecked.

Would it be possible to have a new checkbox "Include in Navbar" instead of reusing the current "hide"? This would enable full functionality and not really change the functionality of the existing "hide" checkbox for nodes.

Unless I'm completely missing something (entirely possible).

You can set the page node to display, but put it in a category that is set to not display.

If I expand this to include other node types then I will likely have to add a configurable option.
 
I had defined a generic link template for each tab to allow people to create sublinks under their tabs. But I didn't realize that it created an empty dropdown menu. Maybe I will remove that option. I suspect dropdowns will mostly go unused for this modification. I could add a configurable option for each node but I prefer to keep things simple and not mess with the data structures.

I really hope you leave in the ability to have the sub-links/dropdowns if needed, I'll be utilizing that quite a bit once I install this over the weekend...
 
You can set the page node to display, but put it in a category that is set to not display.

If I expand this to include other node types then I will likely have to add a configurable option.

Ok, that'll work for now, thanks much Jake, greate addon! =)
 
Yeah it's possible. I may expand this addon to cover those other node types.



It just overloads the existing node options of Display Order and Display in the node list. I prefer not to add any more configurable options unless necessary. The current method works well and has an elegance about it. Is there something you found difficult to use?



library/PageNodesAsTabs/NavTabs.php

Remove the red code leaving only empty single quotes:

Rich (BB code):
// GO THROUGH EACH PAGE
foreach ($pagesSorted AS $page)
{
// IF THEY HAVE PERMISSION TO VIEW THE NODE
$visitor->setNodePermissions($page['node_id'], $page['node_permission_cache']);
if ($pageModel->canViewPage($page))
{
// ADD A NAV TAB FOR THIS PAGE
$extraTabs['pages' . $page['node_name']] = array(
'title' => $page['title'],
'href' => XenForo_Link::buildPublicLink('full:pages', $page),
'position' => ($page['display_order'] < 10 ? 'home' : ($page['display_order'] < 20 ? 'middle' : 'end')),
'linksTemplate' => 'pagesnavtab_' . $page['node_name']
);
}
}

I had defined a generic link template for each tab to allow people to create sublinks under their tabs. But I didn't realize that it created an empty dropdown menu. Maybe I will remove that option. I suspect dropdowns will mostly go unused for this modification. I could add a configurable option for each node but I prefer to keep things simple and not mess with the data structures.

Thanks Jake,

I assume that removes it for all pages. An option like you suggested would be perfect, but of course thats if you have the time. Either way im happy with how it is now. You should put a donation link in your sig
 
Spent the last couple days working on it. I am making it fully featured. It meets Anthony's requirements plus some:

http://xenforo.com/community/threads/page-to-tab-c-w-breadcrumb-mod-discussion.23001/

Each node has its own tab configuration. Supports all node types. Has option to automatically display first level of children as secondary navlinks. Tab stays highlighted when you enter subforums. Has option to specify custom linksTemplate.

I should have it finished in the next day or two. But this update will be for 1.1.x only because 1.0.x was missing some template hooks that I needed.
 
Spent the last couple days working on it. I am making it fully featured. It meets Anthony's requirements plus some:

http://xenforo.com/community/threads/page-to-tab-c-w-breadcrumb-mod-discussion.23001/

Each node has its own tab configuration. Supports all node types. Has option to automatically display first level of children as secondary navlinks. Tab stays highlighted when you enter subforums. Has option to specify custom linksTemplate.

I should have it finished in the next day or two. But this update will be for 1.1.x only because 1.0.x was missing some template hooks that I needed.
Awesome.

Where can I donate?
 
Spent the last couple days working on it. I am making it fully featured. It meets Anthony's requirements plus some:

http://xenforo.com/community/threads/page-to-tab-c-w-breadcrumb-mod-discussion.23001/

Each node has its own tab configuration. Supports all node types. Has option to automatically display first level of children as secondary navlinks. Tab stays highlighted when you enter subforums. Has option to specify custom linksTemplate.

I should have it finished in the next day or two. But this update will be for 1.1.x only because 1.0.x was missing some template hooks that I needed.
What will be the deepest level to access? For ex. can I access the 3rd level of nodes?
 
To better explain my idea:

example.webp

Jake, if you can code it and need some help with css or html I am ready to help you :)
 
Is page node the same as a Xenforo Pages Page ?

Yes it's the same.

Will you post here when the new release is out?

Yes.

What will be the deepest level to access? For ex. can I access the 3rd level of nodes?

There is no limit to depth. All children of a parent tab are assigned to that tab (unless a child itself is also a tab in which case the "closest" tab is used). The addon stores a list of all children of a parent tab so it can FIND_IN_SET() to make the associations.

To better explain my idea:

View attachment 21506

Jake, if you can code it and need some help with css or html I am ready to help you :)

That may be possible by specifying a linksTemplate for that tab. But that layout is not within the "standard" tab system so it is not directly supported.
 
Status
Not open for further replies.
Top Bottom