mirror of
https://github.com/e107inc/e107.git
synced 2025-10-11 04:54:26 +02:00
Custom Page fixes and page breadcrumbs
This commit is contained in:
@@ -440,6 +440,38 @@ class cpage_shortcodes extends e_shortcode
|
||||
|
||||
return '<a class="cpage btn btn-primary btn-chapter'.$inc.'" href="'.$url.'">'.$text.'</a>';
|
||||
}
|
||||
|
||||
|
||||
function sc_chapter_breadcrumb()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
|
||||
$breadcrumb = array();
|
||||
|
||||
$row = $this->getChapter();
|
||||
$brow = $this->getBook($row['chapter_parent']);
|
||||
|
||||
if(empty($brow['chapter_sef']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$row['book_sef'] = vartrue($brow['chapter_sef'],"no-sef-found"); //$this->getBook();
|
||||
|
||||
|
||||
$breadcrumb[] = array('text'=> $brow['chapter_name'], 'url'=> e107::getUrl()->create('page/book/index', $brow,'allow=chapter_id,chapter_sef,book_sef,page_sef'));
|
||||
$breadcrumb[] = array('text'=> $row['chapter_name'], 'url'=> e107::getUrl()->create('page/chapter/index', $row,'allow=chapter_id,chapter_sef,book_sef'));
|
||||
// $breadcrumb[] = array('text'=> $this->var['page_title'], 'url'=> null);
|
||||
|
||||
|
||||
return e107::getForm()->breadcrumb($breadcrumb);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @example {CPAGERELATED: types=news}
|
||||
|
Reference in New Issue
Block a user