ZenphotoCMS Forum
The news breadcrumb - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: The news breadcrumb (/thread-9359.html)



The news breadcrumb - tunafish - 2011-12-08

A good breadcrumb does not wrap a link about the currently active item.
Is there any way to unlink the news index breadcrumb? Any other function I can use for that instead of printNewsIndexURL()

Index[link] » News [link] » My second page [no-link]

Index[link] » News [no-link]

`

"> »

[b]


[/b]

`




The news breadcrumb - sbillard - 2011-12-09

Uhm? how about gettext('news')????




The news breadcrumb - micheall - 2011-12-09

I'm not sure what the issue is, the default breadcrumb from zenpage theme does just that. What theme are you using?

Here's the default zenpage breadcrumb for the image page:
`

"> » 
         [b][/b] ()

`
If you refer to the default zenpage theme it does exactly what you're asking for.




The news breadcrumb - tunafish - 2011-12-09

@ sbillard when I use gettext('news') it's what I want on the [i]News[/i] index page, but there is no link wrapped around it when I go one level deeper.

@ micheall it does that for the [i]Image[/i] pages yes but not for [i]News[/i]. I checked all other themes that ship with ZP and all of them wrap a link on around the [i]News[/i] index.
The printParentBreadcrumb() function says:

Quote:Prints the breadcrumb navigation for album, gallery and image view
So not for News..




The news breadcrumb - acrylian - 2011-12-09

The gallery index url link is added statically before it. If you don't want it you can add an if/else to disable the link to just print "news". The link generally servers as the "news index" link (news page 1 link) so you can easily jump to the first page for futher ones.




The news breadcrumb - tunafish - 2011-12-09

Ah it's not easy to explain but I think you got me acrylian.
An if/else statement is exactly my thought.. but how?
How can I state we are on the index page?

if (this_page_is_the_news_index) { echo "[b]" . gettext('News') . "[/b]"; } else { printNewsIndexURL(gettext('News')); }




The news breadcrumb - acrylian - 2011-12-09

Try
if(is_NewsPage() && !is_NewsArticle() && !is_NewsCategory()) { ... ) else { ... }




The news breadcrumb - tunafish - 2011-12-09

Aha! That will work.
Great. Thanks acrylian!