Display "Section >> Category >> Article name",not breadcrumb

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
ben m
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Feb 01, 2009 8:04 am

Display "Section >> Category >> Article name",not breadcrumb

Post by ben m » Mon Feb 16, 2009 10:16 am

Can anyone help me display "Home >> Section >> Category >> Article name" at the top of articles, instead of the standard breadcrumb?

I'd like to continue displaying "Home>> Section >> Category" for section view, "Home >> Category" instead for category view and "Home" for the home page. I'd like 'Section', 'Category' and 'Home' to link to their respective blog views.

My problem is that a lot of my content is linked to from the front page, which means that all those articles currently display the breadcrumb "Home>> Article name" instead of "Home >> Section >> Category >> Article name".

Any help would be very much appreciated. This would make a good module and I imagine it would be very easy to build, but I'm yet to learn php.

User avatar
epleste
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 182
Joined: Mon Dec 03, 2007 3:23 am
Location: Australia
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by epleste » Tue Feb 24, 2009 3:22 am

The breadcrumbs are linked to your menu structure. To get the breadcrumb to display the section and category names you need to have them in your menu and have them in a parent child relationship as below.

To get a breadcrumb trail like this --> Home > Section > Category > Article

you need these entries in a menu somewhere.

Section
--- Category (child of section)
------ Article (child of category)


If there was an extension that drew a breadcrumb trail based on the section and category of an article instead of a menu entry I'd use it too.
You only get out what you put in!

User avatar
vashanka
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Thu Jun 12, 2008 9:19 pm
Location: Reno, Nevada
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by vashanka » Mon May 04, 2009 7:19 pm

If there was an extension that drew a breadcrumb trail based on the section and category of an article instead of a menu entry I'd use it too.
This is a real weakness in Joomla. I have tried the other two currently available breadcrumb modules and neither solves this problem. Going to ask my developer friend to see if he can build one that displays home > section > category > article which is what people need and want.

User avatar
epleste
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 182
Joined: Mon Dec 03, 2007 3:23 am
Location: Australia
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by epleste » Tue May 05, 2009 2:28 am

The issue with that is that due to the limited depth of Joomla (sections and categories only) sometimes you want to have a longer trail.

Eg
For an intranet I have a section called 'Procedures'. Under that I have a category called 'communications' and one called 'web stats' now obviously web stats belongs under comms but I can't so I rely on the menu to draw my breadcrumbs correctly
You only get out what you put in!

geoxeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Sep 05, 2008 9:52 pm
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by geoxeo » Fri May 08, 2009 10:08 pm

Hello ben m,

I have the feeling you are saying that the links to your articles/categories are not generated the way you would expect because they are referenced by some menu items ...

If this is the case, try the following hack:

locate function _findItem($needles) in the file components/com_content/helpers/route.php

just put return null after the opening bracket

Code: Select all

	function _findItem($needles)
	{
		return null;

		$component =& JComponentHelper::getComponent('com_content');

This way, the pathway and the URL's generated for the categories (in the section views) and for the articles (in section and categorie views) will be what everybody expects

The only (slight) drawback is that it will allow different URL's to link to the same content (which I think is the reason why the Joomla developpers implemented it that way)

Hope this helps
Free Joomla extensions at http://www.geoxeo.com

BillColeman
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri May 15, 2009 2:31 pm

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by BillColeman » Sun May 24, 2009 12:18 pm

i stumbled onto this wile looking for a solution to a similar problem

geoxeo: i tried your code hack. that's a really great pointer... only one problem - when i use an alternate menu to arrive at the same article its back to square 1.
i.e. following a click-path from home to the section list to the category list to the article now shows the path i want (sitename>section>category>article) but using a different sub menu in the section to get there (i.e. my about site section needs its own nav menu) ruins the path making it sitename>category>article once more.

is there any way you know to force the full path to be reurned in all circumstances? i've tried every sef combo and no joy!

grateful for any help at all on this one

geoxeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Sep 05, 2008 9:52 pm
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by geoxeo » Sun May 24, 2009 3:20 pm

Hello Bill,

I am not sure I understand what you mean

Is your site online ?

Cheers
Free Joomla extensions at http://www.geoxeo.com

paulgibbs
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Mon Mar 12, 2007 8:23 pm

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by paulgibbs » Mon Jun 22, 2009 9:21 pm

geoxeo wrote: locate function _findItem($needles) in the file components/com_content/helpers/route.php

just put return null after the opening bracket

Code: Select all

	function _findItem($needles)
	{
		return null;

		$component =& JComponentHelper::getComponent('com_content');
Thank you! You solved my problem!

You mentioned that it allows different URLs to link back to the same article--I'm not following you on that (no pun intended!). Can you please provide an example?

geoxeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Sep 05, 2008 9:52 pm
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by geoxeo » Tue Jun 23, 2009 5:00 pm

Hi Paul,

To try and make my point clear, let me take an example ...

You have SEF turned on (that is important to see the point) and you make 2 menu items:
1/ one to show a category -> URL is /my-category.html
2/ one to show a preferred article that belongs to this category -> URL is /my-article.html

Joomla! default behaviour:
The link generated for our preferred article in the article list in the category view is /my-article.html
Conclusion: the content shown in our preferred article is always referred to as /my-article.hml

Behaviour with my hack:
The link generated for our preferred article in the article list in the category view is /my-category/nn-title-of-my-article.html
Conclusion: the content shown in our preferred article is referred to as /my-article.hml and as /my-category/nn-title-of-my-article.html

Does it help ?

Cheers
Free Joomla extensions at http://www.geoxeo.com

ktsixit
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Fri Mar 13, 2009 12:54 pm

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by ktsixit » Mon Oct 12, 2009 10:42 am

geoxeo wrote:Hello ben m,

I have the feeling you are saying that the links to your articles/categories are not generated the way you would expect because they are referenced by some menu items ...

If this is the case, try the following hack:

locate function _findItem($needles) in the file components/com_content/helpers/route.php

just put return null after the opening bracket

Code: Select all

	function _findItem($needles)
	{
		return null;

		$component =& JComponentHelper::getComponent('com_content');

This way, the pathway and the URL's generated for the categories (in the section views) and for the articles (in section and categorie views) will be what everybody expects

The only (slight) drawback is that it will allow different URL's to link to the same content (which I think is the reason why the Joomla developpers implemented it that way)

Hope this helps
Hi all,
I have the same problem here. In my website I use a main menu which contain section layout items, and is visible in all pages.
In each section there are additional menus that contain article layout items.

I'm trying to make breadcrumbs use the home >> section/category >> article logic.
I tried the hack you suggest but it's not making any difference.
Breadcrumbs module shows home >> article at this point.
Has anybody found a solution to this?

tharait
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Nov 15, 2009 7:21 am

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by tharait » Sun Nov 15, 2009 7:42 am

Im having the same problem. will greatful if someone can help

User avatar
talchu
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Nov 25, 2009 11:02 am
Location: Israel
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by talchu » Wed Nov 25, 2009 11:08 am

I'm using Joomla 1.5.0, and the breadcrumbs work fine for me.
I see the "Section > Category > article" structure, no matter how I reach the article (menu item or homepage link).

If weird things happen, I suggest you to disable Caching (in Site > Global Configuration).

Does that help?

User avatar
tanzaho
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Jan 15, 2010 2:05 pm
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by tanzaho » Tue Feb 09, 2010 11:04 am

This thread helped me to understand the way joomla's breadcrumbs worked. Thanks guys. Even if I didn't try your hack geoxeo, it seems to be what i was looking for initially.

I wrote an article about how to implement an image navigation system, using Joomla, and SEF Urls : http://jice.lavocat.name/blog/2010/02/h ... th-joomla/.
Hope it will help people who where looking for the same trick
French, 26. Advanced Joomla user/integrator.
Main Joomla website : http://www.suwa.fr

User avatar
punaboy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 130
Joined: Fri Feb 10, 2006 6:36 am
Location: 9th Island Las Vegas
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by punaboy » Wed Feb 10, 2010 7:00 pm

I am having the same breadcrumb issues... the "return null;" hack worked for me. Besides the breadcrumb, it also corrected my split menu (categories). Now both breadcrumb and sub-menu point to "index/section/category/article".

The problem that it created is now my frontpage read more links point to "index/article". I tried changing my index page type from "frontpage" to "section blog" but still the same problem.

I'm not a PHP expert so my "work-around" is to use a 3rd party frontpage news component, temporarily.
punaboy
www.alohavalley.com
Notepad is still my friend!

geoxeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Sep 05, 2008 9:52 pm
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by geoxeo » Sat Feb 13, 2010 12:18 am

Hi everyone,

I can see by the number of readers that this is a major concern.

I have the feeling that we usually expect too much from Joomla! core components (namely com_content)

I have tried to explain in detail how Section-Category-Article / Breadcrumbs is working in the basic Joomla! installation

http://blog.geoxeo.com/en/sections-cate ... -by-joomla

The conclusion of this (very long) article is that if you want to show a sections / categories sitemap with satisfactory breadcrumbs, you should NOT attach your categories and articles to ANY menu item.

I hope this will help
Free Joomla extensions at http://www.geoxeo.com

geoxeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Sep 05, 2008 9:52 pm
Contact:

Re: Display "Section >> Category >> Article name",not breadcrumb

Post by geoxeo » Tue Feb 16, 2010 8:01 pm

Hello again,

I have created an installable extension to provide what ben m was asking for exactly one year ago !

Please take a look at the demo:
http://contenttraildemo.geoxeo.com

The extension is available here:
http://www.geoxeo.com/joomla/content-trail.html

I hope this will help

Cheers
Free Joomla extensions at http://www.geoxeo.com

ralfeez
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Thu Jan 17, 2008 10:25 pm
Location: California
Contact:

Re: Display "Section >> Category >> Article name",not breadc

Post by ralfeez » Tue Jun 29, 2010 6:58 pm

geoxeo wrote:Hello again,

I have created an installable extension to provide what ben m was asking for exactly one year ago !

Please take a look at the demo:
http://contenttraildemo.geoxeo.com

The extension is available here:
http://www.geoxeo.com/joomla/content-trail.html

I hope this will help

Cheers
These links are both broken. Do you have an updated version?
thanks,
Ralph
http://www.Nnvent.com Innovation, Design, Develop - web design, web applications, custom extensions

geoxeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Sep 05, 2008 9:52 pm
Contact:

Re: Display "Section >> Category >> Article name",not breadc

Post by geoxeo » Tue Jun 29, 2010 8:50 pm

I have stopped dev and support.
I have removed all my extensions from the JED but I forgot this thread

Sorry
Free Joomla extensions at http://www.geoxeo.com

natecovington
Joomla! Explorer
Joomla! Explorer
Posts: 425
Joined: Tue Jul 29, 2008 11:54 pm
Location: NE PA
Contact:

Re: Display "Section >> Category >> Article name",not breadc

Post by natecovington » Mon Aug 02, 2010 9:15 pm

Hi,

I've been able to use the breadcrumbs to display any way I want to, as long as the menu structure is lined up correctly. Also check to disable the caching on the mod_breadcrumbs because it might be showing you stored links instead of the active page.
I am available for professional Joomla support, consulting, and custom work:
www.covingtoncreations.com

MALdito
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Mon Feb 27, 2006 6:22 am

Re: Display "Section >> Category >> Article name",not breadc

Post by MALdito » Fri Aug 06, 2010 6:37 pm

Be carefull with the hack and googles infamous duplicate content policy ..


Locked

Return to “Joomla! 1.5 Coding”