aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2017-04-23 21:22:40 -0400
committerAndrew Manning <tamanning@zoho.com>2017-04-23 21:22:40 -0400
commit8ad2b3e7a13fccab2e508ce944e0b02c3d259711 (patch)
treed21a73f319d52c8b34d7dadec1ffecd408cdb880
parentbda9a833ba2511a36a569dd03991130e775c5ca7 (diff)
downloadvolse-hubzilla-8ad2b3e7a13fccab2e508ce944e0b02c3d259711.tar.gz
volse-hubzilla-8ad2b3e7a13fccab2e508ce944e0b02c3d259711.tar.bz2
volse-hubzilla-8ad2b3e7a13fccab2e508ce944e0b02c3d259711.zip
When template "none" is used in a webpage layout, then the contents of the page should be the sole output, with no other code before or after the page element content.
-rw-r--r--include/conversation.php9
-rw-r--r--view/tpl/page_display_empty.tpl1
2 files changed, 10 insertions, 0 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 5b2d60583..0f940b1a3 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1541,6 +1541,15 @@ function prepare_page($item) {
// the template will get passed an unobscured title.
$body = prepare_body($item, true);
+ if(App::$page['template'] == 'none') {
+ $tpl = 'page_display_empty.tpl';
+
+ return replace_macros(get_markup_template($tpl), array(
+ '$body' => $body['html']
+ ));
+
+ }
+
$tpl = get_pconfig($item['uid'], 'system', 'pagetemplate');
if (! $tpl)
$tpl = 'page_display.tpl';
diff --git a/view/tpl/page_display_empty.tpl b/view/tpl/page_display_empty.tpl
new file mode 100644
index 000000000..9f000dee8
--- /dev/null
+++ b/view/tpl/page_display_empty.tpl
@@ -0,0 +1 @@
+{{$body}} \ No newline at end of file