Extra content blocks in existing template V2.0
Posted: Wed Sep 09, 2015 12:45 pm
After a upgrade from 1.12 to 2.0 I had a problem to make extra content blocks visible in the frondend of the website. The backend showing the extra content areas when editing a page.
This tip from Rolf give me enough input to make some changes in my existing template.
The old extra content block code (before <!DOCTYPE html>):
New:
And also an extra image on a page.
Old:
New:
In the body:
and
Great that now all templates are grouped together.
This tip from Rolf give me enough input to make some changes in my existing template.
The old extra content block code (before <!DOCTYPE html>):
Code: Select all
{content block=extra_block assign='extra_block' label='Extra Inhoud' wyswiwyg='true'}
Code: Select all
{$extra_block = "{content block=extra_block label='Extra inhoud smal' wyswiwyg=true}" scope=global}
Old:
Code: Select all
{content_image urlonly='1' block='set_image' dir='images/afbeeldingen-rechts' assign='get_image' label='Selecteer afbeelding'}
Code: Select all
{$get_image = "{content_image urlonly=1 block=set_image dir='images/afbeeldingen-rechts' label='Selecteer afbeelding'}" scope=global}
Code: Select all
{$extra_block}
Code: Select all
{if !empty($get_image)}<img class="img-responsive" src="{$get_image}" />{/if}