socals
08-22-2004, 06:26 PM
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?
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?