From 4e3583ab4563028309db7d75b350782b05a22b9b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 18 May 2015 22:18:01 +0200 Subject: [PATCH] allow block title to contain $content title --- include/comanche.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/comanche.php b/include/comanche.php index fc4e4004b..1c9fad8f1 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -167,12 +167,21 @@ function comanche_block($s, $class = '') { dbesc($name) ); + //print_r($r); killme(); + if($r) { $o .= (($var['wrap'] == 'none') ? '' : '
'); - if($r[0]['title']) - $o .= '

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

'; - if($r[0]['body'] === '$content') { + if($r[0]['title'] && trim($r[0]['title']) != '$content') { + $o .= '

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

'; + } + + if($r[0]['title'] && trim($r[0]['title']) === '$content') { + $o .= '

' . get_app()->data['webpage'][0]['title'] . '

'; + } + + + if(trim($r[0]['body']) === '$content') { $o .= prepare_text(get_app()->data['webpage'][0]['body'], get_app()->data['webpage'][0]['mimetype']); } else {