boxtel Posted December 12, 2004 Posted December 12, 2004 open breadcrumb.php class add this function : function trail_simple($separator = ' - ') { $trail_string = ''; for ($i=1, $n=sizeof($this->_trail)-1; $i<$n; $i++) { $trail_string .= $this->_trail[$i]['title']; if (($i+1) < $n) $trail_string .= $separator; } return $trail_string; } in product_info.php <?php echo '<title>' . TITLE . ' :: ' . $breadcrumb->trail_simple(' » ') . '</title>';?> Treasurer MFC
gregy Posted December 18, 2004 Posted December 18, 2004 not sure if posting here is ok . i want to have only date displayed in bredcrumb .. without categories displayed when in some category tenx
Guest Posted January 6, 2005 Posted January 6, 2005 Why not just use: <title><?php echo TITLE . ' :: ' . strip_tags($breadcrumb->trail(' » ')); ?></title> This will save them from editing the class and will have exactly the same output. Bobby
boxtel Posted January 6, 2005 Author Posted January 6, 2005 Why not just use: <title><?php echo TITLE . ' :: ' . strip_tags($breadcrumb->trail(' » ')); ?></title> This will save them from editing the class and will have exactly the same output. Bobby <{POST_SNAPBACK}> because I did not want the "home" or "top" to show up in the title. Therefore, I start the for loop from record 1 instead of record 0 of the array Treasurer MFC
Guest Posted January 7, 2005 Posted January 7, 2005 very similar to http://www.oscommerce.com/community/contributions,1388/, neither of which I seem to be able to get working after installing Bobby's page cache. :) The breadcrumb trail just doesn't seem to be accessible to the function. Not sure why, still playing around with it. -jared
Guest Posted January 7, 2005 Posted January 7, 2005 Ok, to be fair, I don't know that it started happening after installing page cache, it's just that it started around the same time. I didn't notice when it started, only after a while. I therefore have no idea what I did to cause this. All I get for the page title is my store name :: . Same problem with "really easy html title", so I know that it's got to be something with accessing that breadcrumb at that point in the code. -jared
Guest Posted January 7, 2005 Posted January 7, 2005 found it. When we move the code that builds the breadcrumb from application_top.php to header.php, it's not available in index.php until header.php loads (which is after we need the title). Bobby, I see that you have this working on mesoimpact.com - - care to elaborate? I think that I may know a way to get it to work, but I'm curious what you did. -jared
Guest Posted January 7, 2005 Posted January 7, 2005 If I move the breadcrumb construction back into application_top.php, it works, but then I get a dual breadcrumb (though not in the title). Home >> Home >> Category1 >> Category1 >> Product11 >> Product11 I suppose we could have two instances of the breadcrumb, one for the page title (built in application_top.php) and one for the cached page (built in header.php). Somehow, that just seems like *way* too much of a kluge. -jared
boxtel Posted January 7, 2005 Author Posted January 7, 2005 If I move the breadcrumb construction back into application_top.php, it works, but then I get a dual breadcrumb (though not in the title). Home >> Home >> Category1 >> Category1 >> Product11 >> Product11 I suppose we could have two instances of the breadcrumb, one for the page title (built in application_top.php) and one for the cached page (built in header.php). Somehow, that just seems like *way* too much of a kluge. -jared <{POST_SNAPBACK}> if you install the latest version of page cache you do not have that problem, no need to move anything to the header, 1 breadcrumb. try it. Treasurer MFC
Guest Posted January 7, 2005 Posted January 7, 2005 will do. don't remember which version I installed. I'll go check and give it a shot. -jared
Guest Posted January 7, 2005 Posted January 7, 2005 I wish the osC project had some mechanism to contact the store owners that installed a contribution. For instance, the vBulletin.org site has an option to click "installed" after you download (or even before) and you can be contacted on updates. This would help the contribution coders to stay in touch with the ones that have installed a particular version and not have them wade through X number of pages to get to the revised package announcement. Jared => I uploaded a final page cache release that takes care of the breadcrumb. For those that have not installed it the directions are much more clear and less file editing to do. To upgrade move the breadcrumb info back to application_top.php (restore that part) and remove the page cache code on index.php and product_info.php. Then follow the code additions in the install directions (there were no changes to the class). If you need help just contact me and I'll walk you through it. The latest release should correct the problems you've been having with the other breadcrumbs too. Bobby
Recommended Posts
Archived
This topic is now archived and is closed to further replies.