Nodes As Tabs

Nodes As Tabs 1.5.1

No permission to download
All tabs created by this addon have an id of:

nodetab#

Where # is the node_id of the node. You can use that in CSS selectors for custom styling of node tabs. Here is an example:

http://xenforo.com/community/threads/nodes-as-tabs.26687/page-12#post-435085

And please read the few posts after that too. There used to be a bug in the default navigation template, and that bug is still included in many custom styles that people use.
I missed that in my last update to my framework, thanks for letting me know (y).
 
Jake, you should consider putting a unique class in the navtabs so they can be targeted uniquely with CSS.
See: http://xenforo.com/community/threads/color-change.40810/#post-442849

Replied:

http://xenforo.com/community/threads/color-change.40810/#post-442906

It's an old XenForo bug that affects all addons with tabs. You need to fix the bug in your navigation template:

http://xenforo.com/community/threads/extratabid-missing-from-nav-tab.25643/

Then you can apply custom CSS as shown here:

http://xenforo.com/community/threads/nodes-as-tabs.26687/page-12#post-435085
 
There is one, my issue is I needed the class in the dropdown, which XenForo doesn't do.

I've added it to my framework now, but something should be added for dropdowns.

The tabid (which is a CSS class) should be a parent of the menu. So you can use it in your CSS selector to affect the popup menu.
 
The tabid (which is a CSS class) should be a parent of the menu. So you can use it in your CSS selector to affect the popup menu.
The .Menu class doesn't:

html#XenForo.Public.LoggedIn.NoSidebar.hasJS
body.node72.node60.node71
div#AccountMenu.Menu.JsOnly
 
The .Menu class doesn't:

html#XenForo.Public.LoggedIn.NoSidebar.hasJS
body.node72.node60.node71
div#AccountMenu.Menu.JsOnly

Oh you are right. From Chrome's element inspection of the Members menu:

Screen shot 2012-11-14 at 12.39.13 PM.webp

It has a generic unique id that appears to use an autoincrementing number for each menu on the page. You can select on that, but it might change if you add more tabs.

It is possible define a unique id in the HTML (which is what the Account menu does), but that is not supported by the extraTabs skeleton. You would have to modify the navigation template and add the red code to each extraTabs block:

Rich (BB code):
		<!-- extra tabs: end -->
		<xen:if is="{$extraTabs.end}">
		<xen:foreach loop="$extraTabs.end" key="$extraTabId" value="$extraTab">
			<xen:if is="{$extraTab.linksTemplate}">
				<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">
			
				<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
				<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div id="{$extraTabId}" class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
					<div class="primaryContent menuHeader">
						<h3>{$extraTab.title}</h3>
						<div class="muted">{xen:phrase quick_links}</div>
					</div>
					{xen:raw $extraTab.linksTemplate}
				</div>
			</li>
			<xen:else />
				<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
					<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
					<xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
				</li>
			</xen:if>
		</xen:foreach>
		</xen:if>

That will work for your purposes.
 
Oh you are right. From Chrome's element inspection of the Members menu:

View attachment 36908

It has a generic unique id that appears to use an autoincrementing number for each menu on the page. You can select on that, but it might change if you add more tabs.

It is possible define a unique id in the HTML (which is what the Account menu does), but that is not supported by the extraTabs skeleton. You would have to modify the navigation template and add the red code to each extraTabs block:

Rich (BB code):
<!-- extra tabs: end -->
<xen:if is="{$extraTabs.end}">
<xen:foreach loop="$extraTabs.end" key="$extraTabId" value="$extraTab">
<xen:if is="{$extraTab.linksTemplate}">
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">
 
<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
 
<div id="{$extraTabId}" class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
<div class="primaryContent menuHeader">
<h3>{$extraTab.title}</h3>
<div class="muted">{xen:phrase quick_links}</div>
</div>
{xen:raw $extraTab.linksTemplate}
</div>
</li>
<xen:else />
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
<xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
</li>
</xen:if>
</xen:foreach>
</xen:if>

That will work for your purposes.
I already modified it so I have it, but the ID tag changes based on the page you're on. On forum_list it shows as 3, on in a thread it shows as 2.
 
I already modified it so I have it, but the ID tag changes based on the page you're on. On forum_list it shows as 3, on in a thread it shows as 2.

Then edit the navigation template as shown in my previous post. That will use the tabid instead of the generic id.
 
How can I make the root tab as not directing to a link but just opens the menu when clicked.

And :), Where or can I make the child links open in a new page.
 
How can I make the root tab as not directing to a link but just opens the menu when clicked.

And :), Where or can I make the child links open in a new page.

Admin CP -> Appearance -> Templates -> navigation

Add the red code to each extraTabs block (there are 3 of them):

Rich (BB code):
		<!-- extra tabs: end -->
		<xen:if is="{$extraTabs.end}">
		<xen:foreach loop="$extraTabs.end" key="$extraTabId" value="$extraTab">
			<xen:if is="{$extraTab.linksTemplate}">
				<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">
			
				<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
				<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div id="{$extraTabId}" class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
					<div class="primaryContent menuHeader">
						<h3>{$extraTab.title}</h3>
						<div class="muted">{xen:phrase quick_links}</div>
					</div>
					{xen:raw $extraTab.linksTemplate}
				</div>
			</li>
			<xen:else />
				<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
					<a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
					<xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
				</li>
			</xen:if>
		</xen:foreach>
		</xen:if>

Admin CP -> Appearance -> Templates -> page_container_js_body

Add this code at the top of the template:

Rich (BB code):
<script>
$(document).ready(function(){
	// UNLINK TAB ITSELF
	$('.nodetab1 a.navLink').attr('href','javascript:void(0)');

	// SET SECONDARY LINKS TO OPEN NEW WINDOW
	$('.nodetab1 .blockLinksList a').attr('target','_blank');
	$('#nodetab1 .blockLinksList a').attr('target','_blank');
});
</script>

You must specify the node_id of the node tab.

If this doesn't work then you might be afflicted by this old template bug in which case you need to manually apply this fix to your navigation template:

http://xenforo.com/community/threads/extratabid-missing-from-nav-tab.25643/

And you might be interested in these other modifications for a tab that functions solely as a popup menu:

http://xenforo.com/community/resour...ger-popup-instead-of-just-the-down-arrow.968/
http://xenforo.com/community/resources/change-popup-menu-delay.656/
 
Last edited:
Another question relating to this. Can you also change tab names of add ons which have tabs?

Yes, but not through this addon. The tab names of other addons are usually contained in phrases, so search there:

Admin CP -> Appearance -> Search Phrases
 
I have several tabs using Linkforums and I added dropdown secondary links to them with their own connected templates.
The dropdowns all work fine, but when the tab is selected the secondary links don't appear on the secondary bar. It is just blank which looks awful.
Have I missed something?
 
Top Bottom