From 70fa00c014fcdbb666ac870873024c41b6609191 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 15 May 2015 22:20:45 +0200 Subject: allow a block to contain $content --- include/comanche.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/comanche.php b/include/comanche.php index 3030ae5c6..fc4e4004b 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -166,12 +166,19 @@ function comanche_block($s, $class = '') { intval($channel_id), dbesc($name) ); + if($r) { $o .= (($var['wrap'] == 'none') ? '' : '
'); if($r[0]['title']) $o .= '

' . $r[0]['title'] . '

'; - $o .= prepare_text($r[0]['body'], $r[0]['mimetype']); + if($r[0]['body'] === '$content') { + $o .= prepare_text(get_app()->data['webpage'][0]['body'], get_app()->data['webpage'][0]['mimetype']); + } + else { + $o .= prepare_text($r[0]['body'], $r[0]['mimetype']); + } + $o .= (($var['wrap'] == 'none') ? '' : '
'); } } -- cgit v1.2.3