当前位置: 首页>>代码示例>>PHP>>正文


PHP Page_Controller::Breadcrumbs方法代码示例

本文整理汇总了PHP中Page_Controller::Breadcrumbs方法的典型用法代码示例。如果您正苦于以下问题:PHP Page_Controller::Breadcrumbs方法的具体用法?PHP Page_Controller::Breadcrumbs怎么用?PHP Page_Controller::Breadcrumbs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Page_Controller的用法示例。


在下文中一共展示了Page_Controller::Breadcrumbs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Breadcrumbs

 public function Breadcrumbs()
 {
     //Get the default breadcrumbs
     $Breadcrumbs = parent::Breadcrumbs();
     if ($CommMember = $this->getCommMember()) {
         //Explode them into their individual parts
         $Parts = explode(SiteTree::$breadcrumbs_delimiter, $Breadcrumbs);
         //Count the parts
         $NumOfParts = count($Parts);
         //Change the last item to a link instead of just text
         $Parts[$NumOfParts - 1] = "<a href=\"" . $this->Link() . "\">" . $this->Title . "</a>";
         //Add our extra piece on the end
         $Parts[$NumOfParts] = $CommMember->Name;
         //Return the imploded array
         $Breadcrumbs = implode(SiteTree::$breadcrumbs_delimiter, $Parts);
     }
     return $Breadcrumbs;
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:18,代码来源:CommPage.php

示例2: Breadcrumbs

 /**
  * manipulates the defaul logic of building the pages breadcrumbs if a
  * product detail view is requested.
  *
  * @param int    $maxDepth         maximum depth level of shown pages in breadcrumbs
  * @param bool   $unlinked         true, if the breadcrumbs should be displayed without links
  * @param string $stopAtPageType   name of pagetype to stop at
  * @param bool   $showHidden       true, if hidden pages should be displayed in breadcrumbs
  * @param bool   $showProductTitle true, if product title should be displayed in breadcrumbs
  *
  * @return string
  * 
  * @author Sebastian Diel <sdiel@pixeltricks.de>
  * @since 22.04.2015
  */
 public function Breadcrumbs($maxDepth = 20, $unlinked = false, $stopAtPageType = false, $showHidden = false, $showProductTitle = true)
 {
     if ($this->isProductDetailView()) {
         return $this->BreadcrumbsForProduct($maxDepth, $unlinked, $stopAtPageType, $showHidden, $showProductTitle);
     }
     $breadcrumbs = null;
     $this->extend('overwriteBreadcrumbs', $breadcrumbs);
     if (is_null($breadcrumbs)) {
         $breadcrumbs = parent::Breadcrumbs($maxDepth, $unlinked, $stopAtPageType, $showHidden);
     }
     return $breadcrumbs;
 }
开发者ID:silvercart,项目名称:silvercart,代码行数:27,代码来源:SilvercartProductGroupPage.php


注:本文中的Page_Controller::Breadcrumbs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。