D
Deleted member 122910
Guest
Thank you so much for the fast reply and great support ! Really appreciated 

but i would prefer to display the default links (recent posts, followed, etc) instead of totally removing it<xen:elseif is="{$node.level} == 1" />
<li>
<xen:if is="{$nodeTypes.{$node.node_type_id}.public_route_prefix}">
<a href="{xen:link {$nodeTypes.{$node.node_type_id}.public_route_prefix}, $node}" {xen:if $node.nat_newwindow, 'target="_blank"'}>{$node.title}</a>
</xen:if>
</li>
</xen:if>
// TO BE CALLED BY POSTDISPATCH IN YOUR PUBLIC CONTROLLER
// HANDLES TAB SELECTION
public static function postDispatch($controller, $nodeId, $controllerResponse, $controllerName, $action)
{
$optionsModel = self::_getOptionsModel();
$routeMatch = $controller->getRouteMatch();
$request = $controller->getRequest();
$nodeId = ($nodeId ? $nodeId : $optionsModel->getNodeIdFromRequest($request));
if ($nodeTabId = $optionsModel->handleRoute($nodeId, $routeMatch))
{
// USED LATER FOR BREADCRUMBS
$controllerResponse->containerParams['nodeTabId'] = $nodeTabId;
}
}
I forgot I had this add on but posted this https://xenforo.com/community/threa...ts-but-cant-work-out-why.113973/#post-1050122
I need to show navigation on the two linked nodes?
How can I do this?
public static function breadCrumbs($templateName, &$content, array &$containerData, XenForo_Template_Abstract $template)
{
if ($templateName == 'PAGE_CONTAINER'
AND $nodeTabId = $template->getParam('nodeTabId')
)
{
...
// TEMPORARILY REMOVE RELEVANT LISTENERS FOR RE-RENDER
$listeners = XenForo_CodeEvent::getEventListeners('template_post_render');
XenForo_CodeEvent::setListeners(array('template_post_render' => false));
$content = $template->render();
XenForo_CodeEvent::setListeners(array('template_post_render' => $listeners));
...
}
}
We have encountered this piece of code recently
PHP:public static function breadCrumbs($templateName, &$content, array &$containerData, XenForo_Template_Abstract $template) { if ($templateName == 'PAGE_CONTAINER' AND $nodeTabId = $template->getParam('nodeTabId') ) { ... // TEMPORARILY REMOVE RELEVANT LISTENERS FOR RE-RENDER $listeners = XenForo_CodeEvent::getEventListeners('template_post_render'); XenForo_CodeEvent::setListeners(array('template_post_render' => false)); $content = $template->render(); XenForo_CodeEvent::setListeners(array('template_post_render' => $listeners)); ... } }
I think there should be better way to alter the breadcrumb other than issuing a re-rendering of the PAGE_CONTAINER, on every page load? At least can you check if a re-render is required before calling render()? I think almost no one uses the advanced feature that requires this level of hackery.
I think it's better to make changes that alter how html is rendered via template / template modification. In this particular case, $navigation shouldn't be messed in code level (as it may trigger some unexpected behaviors).https://xenforo.com/community/threads/nodebreadcrumbs-usage.27504/
If you have a better solution I would love to hear it. I hate that code.
edit - the condition at the start of that function restricts the re-render to node tabs which is exactly when it is needed.
I think it's better to make changes that alter how html is rendered via template / template modification. In this particular case, $navigation shouldn't be messed in code level (as it may trigger some unexpected behaviors).
With that in mind, I think you can make a modification to "breadcrumb" template and wrap one additional <xen:if /> inside <xen:foreach loop="$navigation" /> to remove unwanted crumbs. For link forum, I think another modification with a custom like <xen:foreach loop="$linkForumNavigation" /> should be enough.
Is there a way to add a "updated" or any other text label next to the tab title?
example:
one of my tabs is linking a node containing a table/sheet. 3-4 times a year this table is updated/changed and when this occurs I'd like to visually inform my members that the content of the tab/node has been updated.
You could set the Tab Title field for that node to override the title.
Thanks for the great add on.
I am wondering if I am making a mistake. I have used it to add an external link to my blog. The URL is a bit odd though it is http://www.caminodesantiago.org.uk/link-forums/camino-adventures.38/ which then redirects to caminoadventures.com
Am I doing something wrong? I would rather have clean links.
@Jake Bunce I'm talking about something like the attached (edited) screenshot. The "new" labels are Photoshopped.
![]()
.navTabs .navTab.nodetab8
{
background-image: url("new.gif");
}
I have a NEW POSTS tab how can i make the unread count work for this tab to where it counts the unread posts and shows it
wouldnt that make my categories child forums?
We use essential cookies to make this site work, and optional cookies to enhance your experience.