Extra content blocks in existing template V2.0

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
(M)
Forum Members
Forum Members
Posts: 118
Joined: Tue Mar 18, 2008 11:43 pm

Extra content blocks in existing template V2.0

Post 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.
Post Reply

Return to “CMSMS Core”