Advances text block options

Our text block has many additional options. Here are they documented

Notice: The most of this options, can be combined. Just separate them with a ,

<?php $scms->text("BLOCKNAME",[
"class"=>"class1 class2"

User management

Per default only the admin account is allowed to edit the data of the blocks. To also allow other users, you can use the following block syntax

<?php $scms->text("BLOCKNAME",["users"=>["noAdminUser","user2"]]);?>

You can define as many users as you want. The users do not already have to be created in the backend. Just insert them here and create them later.

Default Text

If you add a new block, it is empty per default. If you want to provide some standard text, you can do this with the defaultText option. The default text will be shown when ever the content of the block is empty. So if you delete everything, the standard default text again.

<?php $scms->text("BLOCKNAME",["defaultText"=>"This is my<br>HTML default text"]);?>

Text only

Per default, the SingleCMS blocks get surrounded by a <div></div> if that does not suit your use case you can render the block as text only. In this mode only the content does not get surrounded with the <div>

<?php $scms->text("BLOCKNAME",["textOnly"=>true]);?>

The option textOnly can not be combined with class as there is no div anymore where the classes could be assigned to


If you want to style the block in a certain way, SingleCMS provides you with the option to attach classes to the blocks

<?php $scms->text("BLOCKNAME",["class"=>"class1 class2"]);?>