Pass a parameter to a global content block

  Previous article Next article  

Pass a parameter to a global content block

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.1.4
  Last updated: 31-07-2016
  Comments: 0

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>

A2 Webhosting CMS Made Simple

  Comments

  Click here to leave a comment






This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)
  « Enter the CAPTCHA code (lower case)

Your IP address will be stored on submit. I reserve the right to change or delete your response without notice!
In case of abuse your IP address will be blocked!


Can I have your attention for a moment?

Did this tutorial help you solving a problem at your (clients) website and it saved you many hours of work? Great!!
Consider buying Rolf a cup of coffee in return! [ Click here ]


  0 Comments

No comments yet...

CMS Made Simple 2.2.2 - Tutorials, tips and tricks - CMSMS 2.2.2

Pass a parameter to a global content block

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.1.4
  Last updated: 31-07-2016
  Comments: 0

A2 Webhosting CMS Made Simple