Jake Bunce
Well-known member
This addon now lives in the resource manager:
http://xenforo.com/community/resources/nodes-as-tabs.9/
Paypal donations can be sent to donate@mscclan.com
New NodesAsTabs Addon (compatible with 1.1.x only, tested on 1.1.0)
Versions: (attached below)
- NodesAsTabs 1.1.1.zip (current version)
- - - security patch and some code cleaning
- - - the older versions are now removed because they were insecure
- NodesAsTabs110-3.zip
- - - added option for "mark read" link
- - - added option to enable / disable popup menu for secondary links
- NodesAsTabs110-2.zip
- - - fixed untabbed thread / post routes
- - - removed forced category pages in favor of a warning when appropriate
- NodesAsTabs110.zip
In response to requests for additional features I made a more fully-featured tab addon. Here are the highlights:
- Allows you to display any node as a tab in the navbar.
- Supports all node types (not just page nodes).
- Supports tab selection when you enter a tab node.
- All child nodes and other content underneath a tab node will continue to show that parent tab as being selected in the navbar. That includes children of a tab node down to any depth as well as threads and posts inside of those nodes. The containing tab will continue to show as selected.
- Breadcrumbs under a tab node are modified to be rooted to that node so that crumbs for higher level nodes (above the tab) are not shown.
- Tab nodes may contain other tab nodes. The "closest" tab will take precedence when it comes to determining which tab to select.
- Each node gets its own tab configuration options as shown in this picture:
- The node list has an indicator for tab nodes so you can quickly see which nodes are tabs:
- And finally, here is a picture of a tab node on the front end:
For those who are curious about the technical details...
1) This addon creates one new table called nat_options. All data for this addon is contained in that table. It doesn't change anything else in the database. As such, this addon can be disabled or uninstalled very easily without any lasting effects.
2) This addon adds 1-3 queries to every page. If you choose to check child permissions then that's an extra query for each tab that checks child permissions. This is noted in the description of that setting when you edit a node.
3) There is an inconsequential problem with notices and body classes. "Inconsequential" meaning it doesn't affect the majority of users, and you can easily work around the problem if you are affected by it. See this post for details.
__________
Old PageNodesAsTabs Addon (compatible with 1.0.x and 1.1.x, and replaced by the new NodesAsTabs addon for 1.1.x)
Versions: (attached below)
- PageNodesAsTabs.zip (current version)
This addon creates nav tabs for your page nodes if they are not set to display in the node list:
Admin CP -> Applications -> Display Node Tree -> [click the page node] -> Display in the node list
When this is unchecked the page node will display as a nav tab.
The nav tabs use the display order of the page nodes to determine their order amongst themselves in the navbar.
There are three positions for nav tabs: home, middle, and end. This addon uses a range of display orders to know which position to use:
Display Order = Position:
1-9 = home
10-19 = middle
20+ = end
This addon also respects node permissions. If a user is not allowed to view a particular page node then its tab will not show.
If you want to add secondary links under your tabs then you need to create a new template using the URL portion of the page node:
Admin CP -> Appearance -> Templates -> Create New Template
Template Name: pagesnavtab_mypage
Code:
Here is a picture:
http://xenforo.com/community/resources/nodes-as-tabs.9/
Paypal donations can be sent to donate@mscclan.com
New NodesAsTabs Addon (compatible with 1.1.x only, tested on 1.1.0)
Versions: (attached below)
- NodesAsTabs 1.1.1.zip (current version)
- - - security patch and some code cleaning
- - - the older versions are now removed because they were insecure
- NodesAsTabs110-3.zip
- - - added option for "mark read" link
- - - added option to enable / disable popup menu for secondary links
- NodesAsTabs110-2.zip
- - - fixed untabbed thread / post routes
- - - removed forced category pages in favor of a warning when appropriate
- NodesAsTabs110.zip
In response to requests for additional features I made a more fully-featured tab addon. Here are the highlights:
- Allows you to display any node as a tab in the navbar.
- Supports all node types (not just page nodes).
- Supports tab selection when you enter a tab node.
- All child nodes and other content underneath a tab node will continue to show that parent tab as being selected in the navbar. That includes children of a tab node down to any depth as well as threads and posts inside of those nodes. The containing tab will continue to show as selected.
- Breadcrumbs under a tab node are modified to be rooted to that node so that crumbs for higher level nodes (above the tab) are not shown.
- Tab nodes may contain other tab nodes. The "closest" tab will take precedence when it comes to determining which tab to select.
- Each node gets its own tab configuration options as shown in this picture:
- The node list has an indicator for tab nodes so you can quickly see which nodes are tabs:
- And finally, here is a picture of a tab node on the front end:
For those who are curious about the technical details...
1) This addon creates one new table called nat_options. All data for this addon is contained in that table. It doesn't change anything else in the database. As such, this addon can be disabled or uninstalled very easily without any lasting effects.
2) This addon adds 1-3 queries to every page. If you choose to check child permissions then that's an extra query for each tab that checks child permissions. This is noted in the description of that setting when you edit a node.
3) There is an inconsequential problem with notices and body classes. "Inconsequential" meaning it doesn't affect the majority of users, and you can easily work around the problem if you are affected by it. See this post for details.
__________
Old PageNodesAsTabs Addon (compatible with 1.0.x and 1.1.x, and replaced by the new NodesAsTabs addon for 1.1.x)
Versions: (attached below)
- PageNodesAsTabs.zip (current version)
This addon creates nav tabs for your page nodes if they are not set to display in the node list:
Admin CP -> Applications -> Display Node Tree -> [click the page node] -> Display in the node list
When this is unchecked the page node will display as a nav tab.
The nav tabs use the display order of the page nodes to determine their order amongst themselves in the navbar.
There are three positions for nav tabs: home, middle, and end. This addon uses a range of display orders to know which position to use:
Display Order = Position:
1-9 = home
10-19 = middle
20+ = end
This addon also respects node permissions. If a user is not allowed to view a particular page node then its tab will not show.
If you want to add secondary links under your tabs then you need to create a new template using the URL portion of the page node:
Admin CP -> Appearance -> Templates -> Create New Template
Template Name: pagesnavtab_mypage
Code:
Code:
<ul class="secondaryContent blockLinksList">
<li><a href="{xen:link 'url1'}">Text1</a></li>
<li><a href="{xen:link 'url2'}">Text2</a></li>
</ul>
Here is a picture: