Support Forums

Triming the breadcrumbs

This is a discussion on Triming the breadcrumbs within the Technical Support forums, part of the Technical Support Forums category; Hi Guys, How do I trim the breadcrumbs to only show one (the first) entry?...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 02-05-2009, 02:48 PM   #1
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 14
DGiscombe is on a distinguished road
Default Triming the breadcrumbs

Hi Guys,

How do I trim the breadcrumbs to only show one (the first) entry?
DGiscombe is offline  
Old 02-05-2009, 02:53 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 136
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I think we will need some more information. Let's say your breadcrumb looks like this:
Categories -> Autos -> Sedans

What would you want it to display? Sedans?
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 02-05-2009, 03:19 PM   #3
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 14
DGiscombe is on a distinguished road
Default

Sorry, I mean the second one along.

I've deleted: <a href="category.php" class="breadcrumb">{$smarty.const.LANG_BROWSE_CATE GORIES}</a>

So now I have whatever follows. In your example I'd like to trim it to Autos.
DGiscombe is offline  
Old 02-05-2009, 03:25 PM   #4
Developer & Moderator
 
Mike-N-Tosh's Avatar
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,426
Rep Power: 75
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Why would you want to do this?

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 02-05-2009, 03:48 PM   #5
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 14
DGiscombe is on a distinguished road
Default

Bit of a long story...

But basically I'm trying to find a way to display which main category (country) the user is viewing in the top right corner of the site (pointless to me, but means the world to my client). My first idea was to put {categoryname} there, but that displayed country + category, soo, I was thinking of putting the first entry of the breadcrumb up there, which would be country name only.

Another idea I had was to create some kind of cookie after the main category (country) is clicked and have that name constantly displayed until another main category is clicked.

I'm totally a non-scripter noob coming from web-design background, but I pick up on things quite quickly if you guys can help?
DGiscombe is offline  
Old 02-05-2009, 05:25 PM   #6
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 136
Eric Barnes is just really nice Eric Barnes is just really nice
Default

That is pulled from includes/classes/kernel/Categories.php
function breadcrumb()

It basically loops through the categories to get them. So you would probably want to change the if to something like this:
Code:
if ($row['parent_id'] ==0) 
        {
            $path = $path;
        }
This is totally untested and I make no claims it works.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 02-12-2009, 03:12 PM   #7
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 14
DGiscombe is on a distinguished road
Default

Nah, didn't work, but thanks for trying.

Maybe there needs to be a minus entry somewhere?
DGiscombe is offline  
Closed Thread

Thread Tools
Display Modes



All times are GMT -4. The time now is 06:48 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0