#1207 - Adding blocks to templates

Identifier #1207
Issue type Feature request or suggestion
Title Adding blocks to templates
Status Closed (rejected)
Handling member Deleted
Addon General / Uncategorised
Description Adding blocks direct to templates, without having to use Comcode.

This is a simple example of stripping down the main_quotes block and placing it in the footer above the copyright. I have presented it in diff format. "-" means removed line. "+" means added line. The actual tutorial should indicate the changes more clearly, and be done using proper template edits (i.e. saving the edited templates into your own theme).

diff --git a/themes/default/templates/BLOCK_MAIN_QUOTES.tpl b/themes/default/templates/BLOCK_MAIN_QUOTES.tpl
index 924883e..5916119 100755
--- a/themes/default/templates/BLOCK_MAIN_QUOTES.tpl
+++ b/themes/default/templates/BLOCK_MAIN_QUOTES.tpl
@@ -1,14 +1 @@
-<section class="box box___block_main_quotes"><div class="box_inner">
- {+START,IF_NON_EMPTY,{TITLE}}<h3>{TITLE}</h3>{+END}
-
- <blockquote class="quotes_block">
- {CONTENT}
- </blockquote>
-
- {+START,IF_NON_EMPTY,{EDIT_URL}}
- <ul class="horizontal_links associated_links_block_group">
- <li><a href="{EDIT_URL*}" title="{!EDIT}: {TITLE}">{!EDIT}</a></li>
- </ul>
- {+END}
-</div></section>
-
+{CONTENT}
diff --git a/themes/default/templates/GLOBAL_HTML_WRAP.tpl b/themes/default/templates/GLOBAL_HTML_WRAP.tpl
index 0db2319..3e68355 100644
--- a/themes/default/templates/GLOBAL_HTML_WRAP.tpl
+++ b/themes/default/templates/GLOBAL_HTML_WRAP.tpl
@@ -192,6 +192,7 @@ Powered by {$BRAND_NAME*} version {$VERSION_NUMBER*}, (c) ocProducts Ltd
<div class="global_copyright">
{$,Uncomment to show user's time {$DATE} {$TIME}}

+ {$BLOCK,block=main_quotes}

{$COPYRIGHT`}

{+START,IF,{$NOT,{$MOBILE}}}
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated