1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 17:39:46 +01:00

Breadcrumb fallback fix.

This commit is contained in:
Cameron 2019-06-15 16:55:13 -07:00
parent 346d42bdfb
commit 1cca064f0f
2 changed files with 16 additions and 1 deletions

View File

@ -975,6 +975,21 @@ if (!class_exists('e107table', false))
}
/**
* Return the first caption rendered with {SETSTYLE=default} or {SETSTYLE=main}
* @return |null
*/
public function getMainCaption()
{
if(isset($this->mainRenders[0]['caption']))
{
return $this->mainRenders[0]['caption'];
}
return null;
}
function getMagicShortcodes()
{
$ret = array();

View File

@ -3370,7 +3370,7 @@ class e107
{
return array(0=> array('text'=>PAGE_NAME, 'url'=>null));
}
elseif($caption = e107::getRender()->getPrimaryCaption()) // BC search for primary render caption
elseif($caption = e107::getRender()->getMainCaption()) // BC search for primary render caption
{
return array(0=> array('text'=>$caption, 'url'=>null));
}