vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 08-22-2004, 06:26 PM
socals socals is offline
Junior Member
 
Join Date: Aug 2004
Location: California
Posts: 21
Question Drawing Breadcrumbs for Child Pages (manually)

I am creating custom pages, and child pages and I would like the breadcrumb to draw correctly, even if I have to manually add it to the pages.

Example:

+ Freeware Programs
-program 1 (page name is 'software')
-program 2
....

I would like the breadcrumb to look like:
Website Name > Freeware Programs
+- Program 1

To achieve this, I added code to vba_cmps_include_bottom.php:

if ($pages['name'] == 'software')
{
$navbits = array("?page=freeware" => "Freeware Programs","" => $pages['title']);
}
else
{
$navbits[''] = $pages['title'];
}


Since i'm new to vBulletin/PHP/CMPS, I would like to add the code the "correct" way.

If I modify the $navbits in my .php module, it seems to create a top nav of the forum, not the website.

By not touching the $navbits while in my custom page, the top nav breadcrumb is for the website (vbad modification), not the forum, which is what I want.

My modification draws the page exactly as I want it. I was wondering if there is a correct place for the code, or something I need to do different to have it create the top nav correctly from the original .php page?

I also wanted it to display the Software Name in the breadcrumb, not "Software". I did this by overwritting pages['title'] with the software name in my .php program. I tried using my own variable, but it didn't seem to retain the data. Not a global var or something?

Last edited by socals; 08-22-2004 at 06:29 PM.
  #2  
Old 08-23-2004, 02:55 PM
da prez da prez is offline
phptarded
 
Join Date: Jul 2004
Posts: 86
Default Re: Drawing Breadcrumbs for Child Pages (manually)

i believe you will have to write a query(s) to get info for undeclared variables.

assign the value of the query(s) upon return, to the variable of your choice.
__________________
Fighting For Peace, Is Like Screwing For Virginity
  #3  
Old 08-23-2004, 07:52 PM
socals socals is offline
Junior Member
 
Join Date: Aug 2004
Location: California
Posts: 21
Default Re: Drawing Breadcrumbs for Child Pages (manually)

After reading some PHP manuals, I am now using $GLOBALS['varname'] to pass variables.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:08 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.