/** * Prints the parent items breadcrumb navigation for pages or categories * * @param string $before Text to place before the breadcrumb item * @param string $after Text to place after the breadcrumb item */ function printZenpageItemsBreadcrumb($before = NULL, $after = NULL) { global $_zp_current_zenpage_page, $_zp_current_zenpage_news, $_zp_current_category; if (is_NewsPage()) { $page = ''; if (is_NewsArticle()) { $page = $_zp_current_zenpage_news->getNewsLoopPage(); } printNewsIndexURL(NULL, '', '', $page); } if (is_Pages() || is_NewsCategory()) { $parentitems = array(); if (is_Pages()) { $parentitems = $_zp_current_zenpage_page->getParents(); } if (is_NewsCategory()) { $parentitems = $_zp_current_category->getParents(); } foreach ($parentitems as $item) { if (is_Pages()) { $pageobj = new ZenpagePage($item); $parentitemurl = html_encode($pageobj->getLink()); $parentitemtitle = $pageobj->getTitle(); } if (is_NewsCategory()) { $catobj = new ZenpageCategory($item); $parentitemurl = $catobj->getLink(); $parentitemtitle = $catobj->getTitle(); } if ($before) { echo '<span class="beforetext">' . html_encode($before) . '</span>'; } echo "<a href='" . $parentitemurl . "'>" . html_encode($parentitemtitle) . "</a>"; if ($after) { echo '<span class="aftertext">' . html_encode($after) . '</span>'; } } } }
printNewsURL(); echo " <span class='newstype'>[" . getNewsURL() . "]</span>"; ?> </h3> <div class="newsarticlecredit"><span class="newsarticlecredit-left"><?php printNewsDate(); ?> | <?php echo gettext("Comments:"); ?> <?php echo getCommentCount(); ?> </span> <?php if (is_NewsPage()) { echo "<br />"; } else { echo ' | '; printNewsCategories(", ", gettext("Categories: "), "newscategories"); } ?> </div> <?php printNewsContent(); ?> <?php printCodeblock(1); ?> <?php printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', ', ');