Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (32 sloc) 1.426 kb
<?php
require_once( 'AMP/Content/Page.inc.php' );
require_once( 'AMP/Content/Map/Breadcrumb.inc.php' );
$breadcrumb = &AMP_Breadcrumb_Content::instance();
$urlvars = AMP_URL_Read();
$reg = &AMP_Registry::instance();
$intro_id = $reg->getEntry( AMP_REGISTRY_CONTENT_INTRO_ID );
if (isset($urlvars['list']) && $urlvars['list']== AMP_CONTENT_LISTTYPE_CLASS ) {
$breadcrumb->findClass( $urlvars[ AMP_CONTENT_LISTTYPE_CLASS ] );
}
if (isset($urlvars['id']) && $urlvars['id'] && (!isset($urlvars['list'])) && (strpos( $_SERVER['PHP_SELF'], 'article.php')!==FALSE) ) {
$breadcrumb->findArticle( $urlvars[ 'id' ] );
}
if (isset($urlvars['list']) && $urlvars['list']== AMP_CONTENT_LISTTYPE_SECTION ) {
$breadcrumb->findSection( $urlvars[ AMP_CONTENT_LISTTYPE_SECTION ] );
}
if (strpos($_SERVER['PHP_SELF'], 'article.php')===FALSE && isset( $intro_id ) && ($intro_id !== 1)) {
$breadcrumb->findIntroText( $intro_id );
}
$currentPage = & AMPContent_Page::instance();
if (isset($currentPage ) && $page_section = $currentPage->getSectionId() ) {
$breadcrumb->findSection( $page_section );
}
if (isset($urlvars['template_section']) && $urlvars['template_section'] ) {
$breadcrumb->findSection( $urlvars[ 'template_section' ] );
}
//this guard clause is a temporary measure until breadcrumb is reliably called
//by the template
if ( !isset( $avoid_printing_breadcrumb ) ) {
print $breadcrumb->execute();
}
?>
Jump to Line
Something went wrong with that request. Please try again.