<? if ($theme->item() && !empty($parents)): ?>
<ul class="g-breadcrumbs">
<? $i = 0 ?>
<? foreach ($parents as $parent): ?>
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
<? // Adding ?show=<id> causes Gallery3 to display the page
// containing that photo. For now, we just do it for
// the immediate parent so that when you go back up a
// level you're on the right page. ?>
<a href="<?= $parent->url($parent->id == $theme->item()->parent_id ?
"show={$theme->item()->id}" : null) ?>">
<? // limit the title length to something reasonable (defaults to 15) ?>
<?= html::purify(text::limit_chars($parent->title,
module::get_var("gallery", "visible_title_length"))) ?>
</a>
</li>
<? $i++ ?>
<? endforeach ?>
<li class="g-active<? if ($i == 0) print " g-first" ?>">
<?= html::purify(text::limit_chars($theme->item()->title,
module::get_var("gallery", "visible_title_length"))) ?>
</li>
</ul>
<? endif ?>
After playing with this some more, I find this even better solution because if works with tags also:
<title>
<? if ($theme->item()->id == 1): ?>
<?= html::purify($theme->item()->title) ?>
<? else: ?>
<? if (!empty($breadcrumbs)): ?>
<? foreach ($breadcrumbs as $breadcrumb): ?>
<? if (!$breadcrumb->last): ?><? endif ?>
<?= html::purify($breadcrumb->title) ?>
<? if (!$breadcrumb->last): ?> > <? endif ?>
<? endforeach ?>
<? endif ?>
<? endif ?>
</title>
betandallas
Joined: 2012-10-29
Posts: 2
Posted: Thu, 2012-12-27 20:42
Punctuation,
Is there any tool that can help validate/preview the breadcrumb above?
I have created new gallery on my website (wordpress based) and would like little help.
Thanks
Michelle
punctuation
Joined: 2012-12-11
Posts: 37
Posted: Fri, 2012-12-28 02:09
I don't know much, I know just enough to modify the code. This works for Gallery3.
Don't quite understand your question. Are you using wordpress plugin to pull photos from Gallery3 and you want to display "Gallery > Album > Photo" on your wordpress site in page title?
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2012-12-28 02:14
I think she is likely a spammer.
But my WordPress G3 plugin already has breadcrumbs.
Posts: 8339
breadcrumb code from page.html.php gallery3 3.0.2
3.0.4 page.html.php
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 37
Thanks.
I modify it a litte bit, and this works for me:
Posts: 37
After playing with this some more, I find this even better solution because if works with tags also:
Posts: 2
Punctuation,
Is there any tool that can help validate/preview the breadcrumb above?
I have created new gallery on my website (wordpress based) and would like little help.
Thanks
Michelle
Posts: 37
I don't know much, I know just enough to modify the code. This works for Gallery3.
Don't quite understand your question. Are you using wordpress plugin to pull photos from Gallery3 and you want to display "Gallery > Album > Photo" on your wordpress site in page title?
Posts: 8339
I think she is likely a spammer.
But my WordPress G3 plugin already has breadcrumbs.
-s
________________________________
All New jQuery Minislideshow for G2/G3