@Acrylian: printNewsBreadcrumb is not listed as deprecated. printNewsTitle is not a replacement as they do very different things. printNewsBreadcrumb (pasted below) prints "Archive" in the breadcrumb when applicable, or "News" or custom name for News. I think this function or a version there of is very much needed. I am wondering if it was removed by mistake (since not listed in deprecated file). PrintNewsTitle prints the title of a single news item, very different.
` /** * Prints the full link of the news index page (news page 1) * * @param string $name The linktext * @param string $before The text to appear before the link text */ function printNewsBreadcrumb($name = NULL, $before = '', $archive = NULL) { global $_zp_post_date; if ($_zp_post_date) { if (is_null($archive)) { $name = '' . gettext('Archive') . ''; } else { $name = strip_tags(html_encode($archive)); } $link = zp_apply_filter('getLink', rewrite_path(_ARCHIVE_ . '/', "/index.php?p=archive"), 'archive.php', NULL); } else { if (is_null($name)) { $name = gettext('News'); } else { $name = strip_tags(html_encode($name)); } $link = getNewsIndexURL(); } if ($before) { echo '' . html_encode($before) . ''; } echo "" . $name . ""; } `
On the current 1.4.6 build there is actually no `printNewsBreadcrumb` anymore, it has been renamed as I said. No mistake actually. See the news.php of Zenpage theme how we do it actually.
News articles don't have any breadcrumb anyway as they have no hierachy, only pages and categories have. For those there is `printZenpageItemsBreadcrumb()` for that purpose.
Yes, sorry, my mistake answering inbetween. It was not deprecated but just renamed (actually it was named that before) as it "breadcrumb" was misleading as it does not print a real breadcrumb in the meainig of hierachical links.
It is not deprecated because it "never really existed". We had deprecated the prior in 1.4.6 function in favor of printNewsBreadcrumb, but the team voted that this was a misleading name so it went back as on 1.4.5. No deprecation because printNewsBreadcrumb was never a released function.
Comments
@Acrylian: printNewsBreadcrumb is not listed as deprecated. printNewsTitle is not a replacement as they do very different things. printNewsBreadcrumb (pasted below) prints "Archive" in the breadcrumb when applicable, or "News" or custom name for News. I think this function or a version there of is very much needed. I am wondering if it was removed by mistake (since not listed in deprecated file). PrintNewsTitle prints the title of a single news item, very different.
`
/**
* Prints the full link of the news index page (news page 1)
*
* @param string $name The linktext
* @param string $before The text to appear before the link text
*/
function printNewsBreadcrumb($name = NULL, $before = '', $archive = NULL) {
global $_zp_post_date;
if ($_zp_post_date) {
if (is_null($archive)) {
$name = '' . gettext('Archive') . '';
} else {
$name = strip_tags(html_encode($archive));
}
$link = zp_apply_filter('getLink', rewrite_path(_ARCHIVE_ . '/', "/index.php?p=archive"), 'archive.php', NULL);
} else {
if (is_null($name)) {
$name = gettext('News');
} else {
$name = strip_tags(html_encode($name));
}
$link = getNewsIndexURL();
}
if ($before) {
echo '' . html_encode($before) . '';
}
echo "" . $name . "";
}
`
`
<?php if (in_context(ZP_ZENPAGE_NEWS_CATEGORY)) { ?>
<?php printCurrentNewsCategory(); ?>
<?php } else if (in_context(ZP_ZENPAGE_NEWS_DATE)) { ?><?php printCurrentNewsArchive(); ?>
<?php } ?>`
News articles don't have any breadcrumb anyway as they have no hierachy, only pages and categories have. For those there is `printZenpageItemsBreadcrumb()` for that purpose.
Looks like printNewsIndexURL is an exact duplication of the former printNewsBreadcrumb.
Had not caught this before because printNewsBreadcrumb is not showing up deprecated.