Nodes As Tabs

Nodes As Tabs 1.5.1

No permission to download
Question: I've got a tab set up, along with sublinks. To get the initial tab to show a drop-down for the sublinks, I put a # in the "Link URL" box. However, when I click on the tab, I don't get a row of sublinks in the navbar like you do when you click, say, Members. Instead, it throws me back to the Forum home. What's the trick to making a normal tab that, when you click it, shows the sublinks in the navbar, like this:

sublinks.webp
 
Question: I've got a tab set up, along with sublinks. To get the initial tab to show a drop-down for the sublinks, I put a # in the "Link URL" box. However, when I click on the tab, I don't get a row of sublinks in the navbar like you do when you click, say, Members. Instead, it throws me back to the Forum home. What's the trick to making a normal tab that, when you click it, shows the sublinks in the navbar, like this:

View attachment 78593

Link forums are redirects. Use a different node type for the tab, like a category or page node.
 
Link forums are redirects. Use a different node type for the tab, like a category or page node.

Thanks. I created a category node instead. However, now when I click the tab, I get a page with nothing on it but the Tab name. Is the preferred way to do this to create a page node? When I try to do that, it insists on something in the URL Portion field. Confused.
 
Thanks. I created a category node instead. However, now when I click the tab, I get a page with nothing on it but the Tab name. Is the preferred way to do this to create a page node? When I try to do that, it insists on something in the URL Portion field. Confused.

Does the category have any children? The children will be the content of that page.

Yes, you can use a page node if you want. A page node allows you to define your own HTML as the content of the page. On the other hand, a category is more appropriate if you only need it to group other nodes and their content.
 
Hi @Jake Bunce
Is there any way to hide nodes with "Don't Display in the node list" not show on JumpMenu?
On my site, all hidden nodes were shown in Jump popup menu.
 
I have XenPorta Categories which I am trying to add to navbar. Is there an efficient way to accomplish this?

Only thing I can think of is create a link forum with a url pointing to the category page.
 
I have XenPorta Categories which I am trying to add to navbar. Is there an efficient way to accomplish this?

Only thing I can think of is create a link forum with a url pointing to the category page.

This.

XenPorta categories aren't nodes, but link-forums can work here.
 
XenPorta categories aren't nodes, but link-forums can work here.

I tried the link-forum idea and it did work but with one issue. Since it is linking to a /forum.xx/ address the tab does not become active when I am directed to the XenPorta page with a url address like /articles/news/

I'm not too experienced with editing php code, so I am still searching for a way to get this problem solved.
 
Hi, is there a way to override one of the default tab's popup menu?

In particular, I would like to have the node list show up DP-style when a user hovers over the "Forums" tab instead of having a separate Jump menu tab.

http://xenforo.com/community/resources/nodes-as-tabs.9/update?update=6285

Been poking around the "navigation" template but have not been able to have the jump menu popup show up for Forums tab.

Thank you!

The default tabs are in this template:

Admin CP -> Appearance -> Templates -> navigation

DP's forum popup is nonstandard. The nav system does not normally spawn popups for active tabs. Custom programming is required to recreate that.
 
That is not supported by the skeleton for extraTabs, but you can do it with javascript:

Admin CP -> Appearance -> Templates -> page_container_js_body

Add the red code. Change the 1 to the node_id of the tab:

Rich (BB code):
<script>
window.onload = function()
{
    $('.nodetab1 a.navLink').attr('target','_blank');
};
</script>

<script>

<xen:hook name="page_container_js_body">
jQuery.extend(true, XenForo,
{
    visitor: { user_id: {$visitor.user_id} },
    serverTimeInfo:
    {
        now: {$serverTimeInfo.now},
        today: {$serverTimeInfo.today},
        todayDow: {$serverTimeInfo.todayDow}
    },
    _lightBoxUniversal: "{$xenOptions.lightBoxUniversal}",
    _enableOverlays: "@enableOverlays",
    _animationSpeedMultiplier: "@animationSpeedMultiplier",
    _overlayConfig:
    {
        top: "@overlayTop",
        speed: {xen:calc '@overlaySpeed * @animationSpeedMultiplier'},
        closeSpeed: {xen:calc '@overlayCloseSpeed * @animationSpeedMultiplier'},
        mask:
        {
            color: "@overlayMaskColor",
            opacity: "@overlayMaskOpacity",
            loadSpeed: {xen:calc '@overlaySpeed * @animationSpeedMultiplier'},
            closeSpeed: {xen:calc '@overlayCloseSpeed * @animationSpeedMultiplier'}
        }
    },
    _ignoredUsers: {xen:helper json, $visitor.ignoredUsers},
    _loadedScripts: {/*<!--XenForo_Required_Scripts-->*/},
    _cookieConfig: { path: "{xen:jsescape $xenOptions.cookieConfig.path}", domain: "{xen:jsescape $xenOptions.cookieConfig.domain}", prefix: "{xen:jsescape $xenOptions.cookieConfig.prefix}"},
    _csrfToken: "{xen:jsescape $visitor.csrf_token_page}",
    _csrfRefreshUrl: "{xen:jsescape {xen:link login/csrf-token-refresh}}",
    _jsVersion: "{$xenOptions.jsVersion}"
});
jQuery.extend(XenForo.phrases,
{
    cancel: "{xen:jsescape {xen:phrase cancel}}",

    a_moment_ago:    "{xen:jsescape {xen:phrase a_moment_ago}}",
    one_minute_ago:  "{xen:jsescape {xen:phrase one_minute_ago}}",
    x_minutes_ago:   "{xen:jsescape {xen:phrase x_minutes_ago, 'minutes=%minutes%'}}",
    today_at_x:      "{xen:jsescape {xen:phrase today_at_x, 'time=%time%'}}",
    yesterday_at_x:  "{xen:jsescape {xen:phrase yesterday_at_x, 'time=%time%'}}",
    day_x_at_time_y: "{xen:jsescape {xen:phrase day_x_at_time_y, 'day=%day%', 'time=%time%'}}",

    day0: "{xen:jsescape {xen:phrase day_sunday}}",
    day1: "{xen:jsescape {xen:phrase day_monday}}",
    day2: "{xen:jsescape {xen:phrase day_tuesday}}",
    day3: "{xen:jsescape {xen:phrase day_wednesday}}",
    day4: "{xen:jsescape {xen:phrase day_thursday}}",
    day5: "{xen:jsescape {xen:phrase day_friday}}",
    day6: "{xen:jsescape {xen:phrase day_saturday}}",

    _months: "{xen:jsescape '{xen:phrase month_1},{xen:phrase month_2},{xen:phrase month_3},{xen:phrase month_4},{xen:phrase month_5},{xen:phrase month_6},{xen:phrase month_7},{xen:phrase month_8},{xen:phrase month_9},{xen:phrase month_10},{xen:phrase month_11},{xen:phrase month_12}'}",
    _daysShort: "{xen:jsescape '{xen:phrase day_sunday_short},{xen:phrase day_monday_short},{xen:phrase day_tuesday_short},{xen:phrase day_wednesday_short},{xen:phrase day_thursday_short},{xen:phrase day_friday_short},{xen:phrase day_saturday_short}'}",

    following_error_occurred: "{xen:jsescape {xen:phrase following_error_occurred}}",
    server_did_not_respond_in_time_try_again: "{xen:jsescape {xen:phrase server_did_not_respond_in_time_try_again}}",
    logging_in: "{xen:jsescape {xen:phrase logging_in}}",
    click_image_show_full_size_version: "{xen:jsescape {xen:phrase click_image_show_full_size_version}}",
    show_hidden_content_by_x: "{xen:jsescape {xen:phrase show_hidden_content_by_x}}"
});

// Facebook Javascript SDK
XenForo.Facebook.appId = "{xen:jsescape $xenOptions.facebookAppId}";
XenForo.Facebook.forceInit = {xen:if $facebookSdk, true, false};
</xen:hook>

</script>
That is not supported by the skeleton for extraTabs, but you can do it with javascript:

Admin CP -> Appearance -> Templates -> page_container_js_body

Add the red code. Change the 1 to the node_id of the tab:

Rich (BB code):
<script>
window.onload = function()
{
    $('.nodetab1 a.navLink').attr('target','_blank');
};
</script>

<script>

<xen:hook name="page_container_js_body">
jQuery.extend(true, XenForo,
{
    visitor: { user_id: {$visitor.user_id} },
    serverTimeInfo:
    {
        now: {$serverTimeInfo.now},
        today: {$serverTimeInfo.today},
        todayDow: {$serverTimeInfo.todayDow}
    },
    _lightBoxUniversal: "{$xenOptions.lightBoxUniversal}",
    _enableOverlays: "@enableOverlays",
    _animationSpeedMultiplier: "@animationSpeedMultiplier",
    _overlayConfig:
    {
        top: "@overlayTop",
        speed: {xen:calc '@overlaySpeed * @animationSpeedMultiplier'},
        closeSpeed: {xen:calc '@overlayCloseSpeed * @animationSpeedMultiplier'},
        mask:
        {
            color: "@overlayMaskColor",
            opacity: "@overlayMaskOpacity",
            loadSpeed: {xen:calc '@overlaySpeed * @animationSpeedMultiplier'},
            closeSpeed: {xen:calc '@overlayCloseSpeed * @animationSpeedMultiplier'}
        }
    },
    _ignoredUsers: {xen:helper json, $visitor.ignoredUsers},
    _loadedScripts: {/*<!--XenForo_Required_Scripts-->*/},
    _cookieConfig: { path: "{xen:jsescape $xenOptions.cookieConfig.path}", domain: "{xen:jsescape $xenOptions.cookieConfig.domain}", prefix: "{xen:jsescape $xenOptions.cookieConfig.prefix}"},
    _csrfToken: "{xen:jsescape $visitor.csrf_token_page}",
    _csrfRefreshUrl: "{xen:jsescape {xen:link login/csrf-token-refresh}}",
    _jsVersion: "{$xenOptions.jsVersion}"
});
jQuery.extend(XenForo.phrases,
{
    cancel: "{xen:jsescape {xen:phrase cancel}}",

    a_moment_ago:    "{xen:jsescape {xen:phrase a_moment_ago}}",
    one_minute_ago:  "{xen:jsescape {xen:phrase one_minute_ago}}",
    x_minutes_ago:   "{xen:jsescape {xen:phrase x_minutes_ago, 'minutes=%minutes%'}}",
    today_at_x:      "{xen:jsescape {xen:phrase today_at_x, 'time=%time%'}}",
    yesterday_at_x:  "{xen:jsescape {xen:phrase yesterday_at_x, 'time=%time%'}}",
    day_x_at_time_y: "{xen:jsescape {xen:phrase day_x_at_time_y, 'day=%day%', 'time=%time%'}}",

    day0: "{xen:jsescape {xen:phrase day_sunday}}",
    day1: "{xen:jsescape {xen:phrase day_monday}}",
    day2: "{xen:jsescape {xen:phrase day_tuesday}}",
    day3: "{xen:jsescape {xen:phrase day_wednesday}}",
    day4: "{xen:jsescape {xen:phrase day_thursday}}",
    day5: "{xen:jsescape {xen:phrase day_friday}}",
    day6: "{xen:jsescape {xen:phrase day_saturday}}",

    _months: "{xen:jsescape '{xen:phrase month_1},{xen:phrase month_2},{xen:phrase month_3},{xen:phrase month_4},{xen:phrase month_5},{xen:phrase month_6},{xen:phrase month_7},{xen:phrase month_8},{xen:phrase month_9},{xen:phrase month_10},{xen:phrase month_11},{xen:phrase month_12}'}",
    _daysShort: "{xen:jsescape '{xen:phrase day_sunday_short},{xen:phrase day_monday_short},{xen:phrase day_tuesday_short},{xen:phrase day_wednesday_short},{xen:phrase day_thursday_short},{xen:phrase day_friday_short},{xen:phrase day_saturday_short}'}",

    following_error_occurred: "{xen:jsescape {xen:phrase following_error_occurred}}",
    server_did_not_respond_in_time_try_again: "{xen:jsescape {xen:phrase server_did_not_respond_in_time_try_again}}",
    logging_in: "{xen:jsescape {xen:phrase logging_in}}",
    click_image_show_full_size_version: "{xen:jsescape {xen:phrase click_image_show_full_size_version}}",
    show_hidden_content_by_x: "{xen:jsescape {xen:phrase show_hidden_content_by_x}}"
});

// Facebook Javascript SDK
XenForo.Facebook.appId = "{xen:jsescape $xenOptions.facebookAppId}";
XenForo.Facebook.forceInit = {xen:if $facebookSdk, true, false};
</xen:hook>

</script>
I'm actually trying to modify my child menu links so that they open the node-link in a new window. I was able to add the code (in red) that you suggested above, but I couldn't get it to work with child menu links. I tried the parent menu link and that worked.

Given that I'm trying to modify child menu links, is there node_id for that tab? If so, where do I find it? The following is what I'm seeing when I hover over one of the child menu links, but I tried 60 as a node-id in the code to no avail.

/admin.php?nodes/file-server.60
 
I'm actually trying to modify my child menu links so that they open the node-link in a new window. I was able to add the code (in red) that you suggested above, but I couldn't get it to work with child menu links. I tried the parent menu link and that worked.

Given that I'm trying to modify child menu links, is there node_id for that tab? If so, where do I find it? The following is what I'm seeing when I hover over one of the child menu links, but I tried 60 as a node-id in the code to no avail.

/admin.php?nodes/file-server.60

http://xenforo.com/community/threads/nodes-as-tabs.26687/page-13#post-451141
 
Hmm, I am receiving the following error after importing the XML file! I ran a File Health Check, it came back clean, and the rest of my forum works perfect with it's plugins AND theme. Here is the error:

------------------------------------------------------------------------------------------------------------------------------------
Server Error
Mysqli statement execute error : Can't create table 'nat_options' (errno: 13)

  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in NodesAsTabs/Install.php at line 29
  4. NodesAsTabs_Install::install()
  5. call_user_func() in XenForo/Model/AddOn.php at line 215
  6. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  7. XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 187
  8. XenForo_ControllerAdmin_AddOn->actionInstall() in XenForo/FrontController.php at line 347
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  10. XenForo_FrontController->run() in <install location>/forums/admin.php at line 13
------------------------------------------------------------------------------------------------------------------------------------

If anyone could help, that would be fantastic! Thanks!
 
Top Bottom