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>

Buy Me A Coffee


  Comment Form

ReviewManager

Click here to open the form

ReviewManager

  0 Comments

No comments yet...

Buy Me A Coffee

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: 10-06-2019
  Comments: 0
  http://cms.ms/UN2W


Buy Me A Coffee




Advertisement


Ads help me to help you! Thanks!

Ads help me to help you! Buy products from these advertisers!