diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-05-18 22:18:01 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-05-18 22:18:01 +0200 |
commit | 4e3583ab4563028309db7d75b350782b05a22b9b (patch) | |
tree | 4c50b4397211a2f2601c1dc7cf14cb6c36d74eb2 /include/comanche.php | |
parent | 6ab7394565d9a59931a3c1556ef437528975bb73 (diff) | |
download | volse-hubzilla-4e3583ab4563028309db7d75b350782b05a22b9b.tar.gz volse-hubzilla-4e3583ab4563028309db7d75b350782b05a22b9b.tar.bz2 volse-hubzilla-4e3583ab4563028309db7d75b350782b05a22b9b.zip |
allow block title to contain $content title
Diffstat (limited to 'include/comanche.php')
-rw-r--r-- | include/comanche.php | 13 |
1 files changed, 11 insertions, 2 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') ? '' : '<div class="' . $class . '">'); - if($r[0]['title']) + + if($r[0]['title'] && trim($r[0]['title']) != '$content') { $o .= '<h3>' . $r[0]['title'] . '</h3>'; + } + + if($r[0]['title'] && trim($r[0]['title']) === '$content') { + $o .= '<h3>' . get_app()->data['webpage'][0]['title'] . '</h3>'; + } + - if($r[0]['body'] === '$content') { + if(trim($r[0]['body']) === '$content') { $o .= prepare_text(get_app()->data['webpage'][0]['body'], get_app()->data['webpage'][0]['mimetype']); } else { |