The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Taking the Breadcrumb out of the the Navbar
Hi,
I want to have my breadcrumb in a separate template to my navbar. I've created the template and plugins (one at hook location cache_templates and one at hook location parse_templates) to make it show but the breadcrumb doesn't work, it only ever shows the forum name. From what I can tell the conditional "<if condition="is_array($navbits)">" in the breadcrumb template isn't being satisfied. How can I fix that? I tried searching but I can't find an answer. I want to use this template on all the pages that the breadcrumb would be shown on normally. Thanks in advance. |
#2
|
||||
|
||||
You need to make sure the template you are using is evaled after $navbits is defined. So, you may have to pick a different hook location than parse_templates to eval your template.
|
#3
|
|||
|
|||
Have you any idea what location? Navbits_complete seems the obviuos choice but doesn't seem to work. I'm not really sure where the hook locations are exactly
--------------- Added [DATE]1227471136[/DATE] at [TIME]1227471136[/TIME] --------------- Incidentally I'm using Code:
eval('$breadcrumb = "' . fetch_template('breadcrumb') . '";'); |
#4
|
||||
|
||||
I've never played with this, so I can't give a define solution. Your eval looks correct, but why aren't you just putting in $navbits where you want instead of evaling a template and putting in $breadcrumb?
|
#5
|
|||
|
|||
I'm not sure what you mean? If I put $navbits in a template it just prints the word 'array'. My $breadcrumb template looks like
Code:
<table align="center" bgcolor="#ccccff" width="840px" cellpadding="25px" cellspacing="0"><tr><td bgcolor="#ffffff" width="100%" valign="top" height="60px"> <if condition="is_array($navbits)"> <table cellpadding="0" cellspacing="0" border="0"> <tr valign="bottom"> <td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td> <td> </td> <td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td> </tr> <tr> <td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td> </tr> </table> <else /> <div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div> </if> </td> </tr> </table> |
#6
|
||||
|
||||
I'm just thinking that you are evaling it at the wrong time and I'm not sure what to suggest regarding that. For instance, I happen to have member.php opened and the $navbar array isn't contructed until the very bottom of that page. Therefore, if you pick any hook location that gets evaled *before* that point, you aren't going to get it evaled correctly. The only hook location after that is member_complete. But, that isn't available on every page. So, I'm not sure how you are supposed to go about this without having several plugins that eval your template all for different pages.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|