aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-05-18 22:18:01 +0200
committerMario Vavti <mario@mariovavti.com>2015-05-18 22:18:01 +0200
commit4e3583ab4563028309db7d75b350782b05a22b9b (patch)
tree4c50b4397211a2f2601c1dc7cf14cb6c36d74eb2 /include
parent6ab7394565d9a59931a3c1556ef437528975bb73 (diff)
downloadvolse-hubzilla-4e3583ab4563028309db7d75b350782b05a22b9b.tar.gz
volse-hubzilla-4e3583ab4563028309db7d75b350782b05a22b9b.tar.bz2
volse-hubzilla-4e3583ab4563028309db7d75b350782b05a22b9b.zip
allow block title to contain $content title
Diffstat (limited to 'include')
-rw-r--r--include/comanche.php13
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 {