1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 11:20:25 +02:00

Issue #4368 Fixed hardcoded string for 'related' content. Now uses tablerender(). Shortcode processing of {---CAPTION---} added.

This commit is contained in:
Cameron
2021-03-22 11:26:51 -07:00
parent 21f8fdcbf6
commit c33b91ee5c
4 changed files with 14 additions and 7 deletions

View File

@@ -94,8 +94,8 @@ $PAGE_TEMPLATE['default']['end'] = '{CPAGERELATED: types=page,news}</div>';
// define different tablerender mode here
$PAGE_TEMPLATE['default']['tableRender'] = 'cpage';
$PAGE_TEMPLATE['default']['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}<h2 class="caption">{LAN=LAN_RELATED}</h2><div class="row">';
$PAGE_TEMPLATE['default']['related']['caption'] = '{LAN=RELATED}';
$PAGE_TEMPLATE['default']['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}<div class="row">';
$PAGE_TEMPLATE['default']['related']['item'] = '<div class="col-md-4"><a href="{RELATED_URL}">{RELATED_IMAGE}</a><h3><a href="{RELATED_URL}">{RELATED_TITLE}</a></h3></div>';
$PAGE_TEMPLATE['default']['related']['end'] = '</div>';

View File

@@ -161,6 +161,11 @@
$ret[$sc] = isset($val[$var]) ? (string) $val[$var] : null;
}
if($tmp = e107::callMethod('theme_shortcodes', 'sc_caption', varset($val['caption'])))
{
$ret['{---CAPTION---}'] = $tmp;
}
$bread = e107::breadcrumb();
$ret['{---BREADCRUMB---}'] = e107::getForm()->breadcrumb($bread, true);

View File

@@ -4600,9 +4600,10 @@ var_dump($select_options);*/
if(count($list))
{
return "<div class='e-related clearfix hidden-print'>".$head.implode("\n",$list).$tp->parseTemplate($TEMPLATE['end']). '</div>';
$text = "<div class='e-related clearfix hidden-print'>".$head.implode("\n",$list).$tp->parseTemplate($TEMPLATE['end']). '</div>';
$caption = $tp->parseTemplate(varset($TEMPLATE['caption']));
return e107::getRender()->tablerender($caption, $text, 'related', true);
// return "<div class='e-related clearfix hidden-print'><hr><h4>".defset('LAN_RELATED', 'Related')."</h4><ul class='e-related'>".implode("\n",$list)."</div>"; //XXX Tablerender?
}
}

View File

@@ -172,6 +172,7 @@ $NEWS_TEMPLATE['related']['start'] = "<hr><h4>".defset('LAN_RELATED', 'Related')
$NEWS_TEMPLATE['related']['item'] = "<li><a href='{RELATED_URL}'>{RELATED_TITLE}</a></li>";
$NEWS_TEMPLATE['related']['end'] = "</ul>";*/
$NEWS_TEMPLATE['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}<h2 class="caption">You Might Also Like</h2><div class="row">';
$NEWS_TEMPLATE['related']['item'] = '<div class="col-md-4"><a href="{RELATED_URL}">{RELATED_IMAGE}</a><h3><a href="{RELATED_URL}">{RELATED_TITLE}</a></h3></div>';
$NEWS_TEMPLATE['related']['end'] = '</div>';
$NEWS_TEMPLATE['related']['caption'] = '{LAN=RELATED}';
$NEWS_TEMPLATE['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}<div class="row">';
$NEWS_TEMPLATE['related']['item'] = '<div class="col-md-4"><a href="{RELATED_URL}">{RELATED_IMAGE}</a><h3><a href="{RELATED_URL}">{RELATED_TITLE}</a></h3></div>';
$NEWS_TEMPLATE['related']['end'] = '</div>';