MENU

Pass a parameter to a global content block

  Previous article Next article  

In CMS Made Simple you can pass your own parameter to a global content block.

  How to use

The regular tag:

{global_content name='SomeName'}

The tag with an extra parameter:

{global_content name='SomeName' foo='bar'}

You can use the parameter in the content like:

GCB Content
The value of the "foo" parameter is {$gcb_params.foo}

Just an example how you could use it:

{global_content name='SomeName' float='left'}
{global_content name='SomeName' float='right'}
GCB Content
<div class="{$gcb_params.float}" style="float: {$gcb_params.float}"> // CONTENT // </div>


  Comment Form

Click here to open the form


  0 Comments

No comments yet...

CMS Made Simple - Tutorials, tips and tricks - CMSMS

Pass a parameter to a global content block

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.1.4
  Last updated: 22-11-2017
  Comments: 0
  http://cms.ms/UN2W

Advertisement



Ads help me to help you! Thanks!

Ads help me to help you! Thanks!

Ads help me to help you! Thanks!