View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001207 | Composr documentation | [All Projects] General / Uncategorised | public | 2013-04-26 18:16 | 2015-09-25 20:19 |
| Reporter | Chris Graham | Assigned To | |||
| Severity | Feature-request | ||||
| Status | closed | Resolution | won't fix | ||
| Summary | 0001207: Adding blocks to templates | ||||
| 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"> - - - {+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}}} | ||||
| Tags | No tags attached. | ||||
| Time estimation (hours) | |||||
| Sponsorship open | |||||
|
|
blocks_to_templates.odt (15,771 bytes) |
|
|
Assigned to Anoop for review |
|
|
blocks_to_templates_new.odt (68,992 bytes) |
|
|
Covered well enough already, and the verbosity here just re-explains core concepts. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-02-26 18:29 | Chris Graham | Category | General => General / Uncategorised |