• 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.
How do I add a new link under the Forums tab?

I was hoping I could have a tab and under that links that led to various external pages of a sister site.
 
Found a small problem.

I set one of my forums as a tab and it all works fine until I read a thread.
Then the tab is focussed and the breadcrumbs display Home > Forum Tab for all forums other than the forum in question; the breadcrumbs display correctly when reading a thread from that forum.
 
Is it possible to link an added tab to an external page/site?

Yes. Create a "link forum" and make it a tab.

How do I add a new link under the Forums tab?

I was hoping I could have a tab and under that links that led to various external pages of a sister site.

In that case create a category and make it a tab that shows child links. Then under that tab create link forums.
 
Found a small problem.

I set one of my forums as a tab and it all works fine until I read a thread.
Then the tab is focussed and the breadcrumbs display Home > Forum Tab for all forums other than the forum in question; the breadcrumbs display correctly when reading a thread from that forum.

Bug confirmed. I will issue a fix shortly.

This bug only affects threads and posts that are not inside of a tab node.
 
Found a small issue Jake...not really a bug though.

Using the tab for a category that contains a couple of forums. I copied the "Mark Forums Read" link from the navigation template to the sub menu of the tab however when clicking you only get the option to mark ALL forums read, not just the one forum that you are in under the new tab
 
I posted an update in the first post (NodesAsTabs110-2.zip). It fixes the bug that Brogan found. It also removes forced category pages in favor of a warning message when conditions are met:

Screen shot 2011-11-21 at 7.24.10 PM.webp

Found a small issue Jake...not really a bug though.

Using the tab for a category that contains a couple of forums. I copied the "Mark Forums Read" link from the navigation template to the sub menu of the tab however when clicking you only get the option to mark ALL forums read, not just the one forum that you are in under the new tab

The new update also addresses this problem. I have made $nodeTab available to linkTemplates so you can use this code:

Code:
<xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'forums/-/mark-read', $nodeTab, 'date={$serverTime}'}" class="OverlayTrigger">{xen:phrase nat_mark_tab_read}</a></li></xen:if>

But this code only works for forum tabs. You can't "mark read" a category or page node.
 
I will send you my donation once I will update my forum to XF 1.1.0 and then download your add-on.
 
Tried to output 3 node levels but got no solution.
I want to include in the navBar a tab with this structure:

Category
- Forum
-- SubForum

Is it possible to do with template? or anything else maybe?
 
Tried to output 3 node levels but got no solution.
I want to include in the navBar a tab with this structure:

Category
- Forum
-- SubForum

Is it possible to do with template? or anything else maybe?

I could be wrong, but I think Jake said that it'll include all child nodes, but I think it only builds out to a depth of one child from the tab.
 
The new update also addresses this problem. I have made $nodeTab available to linkTemplates so you can use this code:

Code:
<xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'forums/-/mark-read', $nodeTab, 'date={$serverTime}'}" class="OverlayTrigger">{xen:phrase nat_mark_tab_read}</a></li></xen:if>

But this code only works for forum tabs. You can't "mark read" a category or page node.
Hi Jake
Added the code to the tab sub menu and receive an error when in a forum under the tab:
The requested forum could not be found.

I have:
Page
- Category
--Forum 1
--Forum 2 etc

The error happens when viewing forum 1 or 2 etc...also for the category but know it wouldn't work in there anyway...I think the simplest option for me would be to place a "Mark This Forum Read" link where it use to be instead of in the sub menu
 
Tried to output 3 node levels but got no solution.
I want to include in the navBar a tab with this structure:

Category
- Forum
-- SubForum

Is it possible to do with template? or anything else maybe?

There is a configurable option for including child links:

Screen shot 2011-11-22 at 2.43.36 PM.webp

But it only includes one-level of children. You can probably manage this by manually including forum links in your own linksTemplate for that tab, but the nav system doesn't manage hierarchical secondary links like this. Some CSS will likely be required to differentiate the popup links from the row of secondary links to allow for the tree structure in the popup. I will look into adding a default option for this.

Hi Jake
Added the code to the tab sub menu and receive an error when in a forum under the tab:
The requested forum could not be found.

I have:
Page
- Category
--Forum 1
--Forum 2 etc

The error happens when viewing forum 1 or 2 etc...also for the category but know it wouldn't work in there anyway...I think the simplest option for me would be to place a "Mark This Forum Read" link where it use to be instead of in the sub menu

That's because the link is for the tab (the category node), not the forum you are currently in. It would only work if the tab is a forum node. I should probably address this because it's inconsistent with the default behavior. I will come up with something for the next update.

I could be wrong, but I think Jake said that it'll include all child nodes, but I think it only builds out to a depth of one child from the tab.

Correct. For the purpose of tab selection it will recognize all children down to any depth. But the secondary links currently only support one level of children.
 
How do I get the whole node/tab itself to show up only if a user is logged in? That is, it would be invisible to guests.
 
How do I get the whole node/tab itself to show up only if a user is logged in? That is, it would be invisible to guests.

Enable the permission option for that tab:

Screen shot 2011-11-23 at 4.01.47 AM.webp

Then deny access for guests:

Admin CP -> Applications -> Display Node Tree -> Permissions -> Unregistered / Unconfirmed

Revoke all.
 
Status
Not open for further replies.
Top Bottom