![]() |
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. :) |
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.
|
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') . '";'); |
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?
|
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"> |
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.
|
All times are GMT. The time now is 02:54 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|