Page 1 of 1

Extra content blocks in existing template V2.0

Posted: Wed Sep 09, 2015 12:45 pm
by (M)
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>):

Code: Select all

{content block=extra_block assign='extra_block' label='Extra Inhoud' wyswiwyg='true'}
New:

Code: Select all

{$extra_block = "{content block=extra_block label='Extra inhoud smal' wyswiwyg=true}" scope=global}
And also an extra image on a page.
Old:

Code: Select all

{content_image urlonly='1' block='set_image' dir='images/afbeeldingen-rechts' assign='get_image' label='Selecteer afbeelding'}
New:

Code: Select all

{$get_image = "{content_image urlonly=1 block=set_image dir='images/afbeeldingen-rechts' label='Selecteer afbeelding'}" scope=global}
In the body:

Code: Select all

{$extra_block}
and

Code: Select all

{if !empty($get_image)}<img class="img-responsive" src="{$get_image}" />{/if}
Great that now all templates are grouped together.