vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Duplicate breadcrumb on page (https://vborg.vbsupport.ru/showthread.php?t=92974)

darnoldy 07-27-2005 02:31 AM

Duplicate breadcrumb on page
 
Folks-

Okay, i'm stumped. Heeeeelp!

I want to split the navbar and breadcrumb, so I can duplicate the breadcrumb at the bottom of the page.

I created a new template called "navbar_breadcrumb", added a fetch_template line to the phpinclude_start template, and inserted a $navbar_breadcrumb variable into the proper pages, then copied the entire navbar script into navbar_breadcrumb.

Now, here's the strange part....

When I display the page, the breadcrumb that is produced by the navbar template works, the breadcrumb that is produced by navbar_breadcrumb does not! They are the *same* code.

The reason that it is not working seems to be that there is a conditional in the breadcrumb code:

PHP Code:

<if condition="is_array($navbits)"

that is testing true in the navbar template and false in the navbar_breadcrumb template.

But I don't know why. Any suggestions, ideas?

--don

Adrian Schneider 07-27-2005 02:40 AM

$navbits and $navbar are defined before the page is displayed, whereas php_include code is output at the end of the header template. Try putting it near the end of global.php.

I'm gonna go test this to double check, so I'll be back in a few mins.
---

Okay I got it working putting

PHP Code:

eval('$navbar2 = "' fetch_template('navbar2') . '";'); 

Just below (global.php)
PHP Code:

eval('$header = "' fetch_template('header') . '";'); 

Also, it seems I have to add $navbar2 into every template I want it used in... The easiest way I see doing this is a find replace: replace every instance of "$footer" and replace it with "$navbar2 $footer".

(well replace every navbar2 with navbar_breadcrumb, as that is what you used).

darnoldy 07-27-2005 03:55 AM

1 Attachment(s)
Quote:

Originally Posted by TheSpecialist
Try putting it near the end of global.php.

First, thanks for helping!

Okay, I edited global.php--and nothing blew up <g>! However, still no joy. Although the template displays, the breadcrumb won't leave crumbs.

If you look at the attachment, you can see what I mean. The upper navbar/breadcrumb is produced by $navbar, the lower navbar/breadcrumb is produced by $navbar_breadcrumb. Again, these two template contain exactly the same code.

:surprised: don


All times are GMT. The time now is 10:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00967 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete