Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-16 22:23:08

cmscritic
Member
From: Edmonton, Alberta, Canada
Registered: 2009-07-09
Posts: 29
Website

Hide section name in breadcrumbs

How do I hide the section name in the breadcrumbs? I’ve tried using <txp:breadcrumb /> but it does not have the option and I’ve tried tcm_crumbs but it doesn’t appear to have the option either.

Can anyone assist?

Offline

#2 2009-08-16 23:01:45

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 310
Website GitHub GitLab Mastodon Twitter

Re: Hide section name in breadcrumbs

I have adapted my custom <txp:output_form form="breadcrumb" />, where you can remove ISSN, add title=“1”, put Category1 & Category2, and replace <dl> with <p>, if you wish:

	<dl id="trail">
<dt id="issn">ISSN 1392-9127</dt><dd>
<txp:link_to_home><txp:site_name /></txp:link_to_home> &raquo;	
<txp:if_author> <a href="<txp:site_url />authors/">authors</a> <txp:else />
<txp:if_category> <txp:category link="1" /> <txp:else />
<txp:if_search> reward <txp:else />
news</txp:if_author></txp:if_category></txp:if_search></dd></dl>

Sorry for confusing, I have made this form for the default template only, and another one for section templates.

Last edited by Vienuolis (2009-08-16 23:26:24)

Offline

#3 2009-08-16 23:56:45

cmscritic
Member
From: Edmonton, Alberta, Canada
Registered: 2009-07-09
Posts: 29
Website

Re: Hide section name in breadcrumbs

Thanks for the reply but you completely lost me. I’m a newbie to TXP

Offline

#4 2009-08-17 00:26:25

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Hide section name in breadcrumbs

cmscritic wrote:

Thanks for the reply but you completely lost me. I’m a newbie to TXP

Vienuolis means that with compining TXP tags, you can do the breadcrumbs you wish. The <txp:breadcrumb /> itself can only output one kind of format, but by doing it yourself with tags, you can do anykind of breadcrumb. To understand more, it’s better to just try things out.

  1. See Tag Reference. Remember to bookmark it.
  2. Test things out.
  3. Ask for help, if problem occurs.

Vienuolis provided a fine example of tag usage. An other really simple one

<txp:site_name />
<txp:category title="1" link="1" />
<txp:if_individual_article>
	<txp:permlink />
</txp:if_individual_article>

Last edited by Gocom (2009-08-17 00:34:06)

Offline

#5 2009-08-17 15:07:08

cmscritic
Member
From: Edmonton, Alberta, Canada
Registered: 2009-07-09
Posts: 29
Website

Re: Hide section name in breadcrumbs

For future reference, I thought I’d capture here how I managed to get this done. It appears it’s quite doable with a simple plugin. I used tcm_crumbs and the following string:

<txp:tcm_crumbs separator=” &raquo; “ showhome=“0” hometitle=“Home” notitle=“1” mode=“c” />

The quick breakdown is this: It will show the home link in the breadcrumbs but rename it to Home. it will not show the post title and it will show the category.. if i wanted to include the section I would change mode to “sc”

That is all.

~Mike

Offline

Board footer

Powered by FluxBB