View Full Version : Breadcrumbs Module
Rob Locke
11-22-2005, 01:35 PM
Can someone tell me how to add a module containing the breadcrumb information? I have copied all the code from the 'navbar' template to a new module, but the breadcrumbs do not populate as I navigate through the CMPS pages.
I am sure I'm missing something silly, but I don't know what it is. Any suggestions?
Many thanks!
Check in you cmps settings in the admin area. At the bottom there is an option to turn breadcrumbs on/off. Hope this helps.
Rob Locke
11-23-2005, 11:38 AM
I am not familiar with a 'breadcrumbs' setting??? I know there is a 'navbar' setting, which is enabled. The breadcrumbs work fine in the navbar, but still do not display in the module I create, even though all the code is there (copied exactly from the navbar module).
Brian, do you know what I can/must do to get the breadcrumbs working in a module? I have a specific reason for needing this. Once the module is working I will hide the navbar using an <if defined...> conditional in the 'navbar' template.
Thanks, in advance, for the solution to my minor dilemma!
Rob Locke
11-26-2005, 02:21 AM
*bump*
Brian
11-30-2005, 05:13 PM
The stuff for the navbar is executed well after the modules, so it's not going to be that easy to add a module with breadcrumb info.
Chuckie
11-30-2005, 08:14 PM
Can be done. I modified this from some earlier cade I had I think. (Old age and Memory) lol
navbar_links replace all with this:
<if condition="$show['breadcrumb']">
> <a href="$nav_url">$nav_title</a>
<else />
$nav_title
</if>
Make a template module called navbits or whatever and shoot this code on the template box. (You can put it in your footer template or anywhere and get the navbits there as well.)
<!/-- Breadcrumbs Box -->
<td class="nav_bc" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="middle">
<td><a href="#" onclick="history.back(1)"><img src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td> </td>
<td width="100%"><span class="nav_bc"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb] > <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="nav_bc" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
<!/-- Breadcrumbs Box -->
Add it to the pages you want to display it.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.