本文整理汇总了PHP中td_page_generator::get_category_breadcrumbs方法的典型用法代码示例。如果您正苦于以下问题:PHP td_page_generator::get_category_breadcrumbs方法的具体用法?PHP td_page_generator::get_category_breadcrumbs怎么用?PHP td_page_generator::get_category_breadcrumbs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_page_generator
的用法示例。
在下文中一共展示了td_page_generator::get_category_breadcrumbs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<?php
/* ----------------------------------------------------------------------------
The slider that shows featured posts on category templates is here
*/
global $cur_cat_obj, $loop_sidebar_position, $loop_module_id;
//bread crumbs
echo td_page_generator::get_category_breadcrumbs($cur_cat_obj);
if ($loop_module_id != 1 and $loop_module_id != 7) {
//the category title
?>
<header>
<h1 itemprop="name" class="entry-title td-page-title">
<?php
/*<a itemprop="url" href="<?php echo get_category_link($cur_cat_obj->cat_ID)?>" rel="bookmark" title="<?php echo __td('Posts in ') . $cur_cat_obj->name ?>"><?php echo $cur_cat_obj->name ?></a> */
?>
<span><?php
echo $cur_cat_obj->name;
?>
</span>
</h1>
</header>
<?php
//the subcategories
if (!empty($cur_cat_obj->cat_ID)) {
$td_sub_cats = get_categories(array('parent' => $cur_cat_obj->cat_ID));
if (!empty($td_sub_cats)) {
echo '<ul class="td-category td-category-page-subcats">';
echo '<li><span class="td-category-page-sub-ind"></span></li>';
foreach ($td_sub_cats as $td_sub_cat) {
if (!empty($td_sub_cat->name)) {
示例2: get_breadcrumbs
protected function get_breadcrumbs()
{
return td_page_generator::get_category_breadcrumbs($this->current_category_obj);
}