當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。