mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Page: Fix for {CPAGEFIELDTITLE: name=x} rendering.
This commit is contained in:
@@ -36,6 +36,8 @@ class cpage_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
$this->chapterData[$id] = $row;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -622,6 +624,7 @@ class cpage_shortcodes extends e_shortcode
|
||||
|
||||
function sc_cpagefieldtitle($parm=null)
|
||||
{
|
||||
|
||||
if(empty($parm['name']) || empty($this->var['page_fields']))
|
||||
{
|
||||
return null;
|
||||
@@ -631,6 +634,12 @@ class cpage_shortcodes extends e_shortcode
|
||||
$key = $parm['name'];
|
||||
|
||||
|
||||
if(!empty($this->chapterData[$chap]['chapter_fields']) && is_string($this->chapterData[$chap]['chapter_fields']))
|
||||
{
|
||||
$this->chapterData[$chap]['chapter_fields'] = e107::unserialize($this->chapterData[$chap]['chapter_fields']);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($this->chapterData[$chap]['chapter_fields'][$key]['title']))
|
||||
{
|
||||
return $this->chapterData[$chap]['chapter_fields'][$key]['title'];
|
||||
|
Reference in New Issue
Block a user