Block Types

Blocks

Coaster CMS is built upon Laravel 5 and utilises the blade templating engine, because of this building templates in Coaster is slightly different to what you'd expect with vanilla PHP. Instead of using the conventional PHP opening tags, blade uses {!! code goes here !!}. Anything within these two tags is printed to the page, much the same as PHP's echo. However, if you so desire, both classic PHP and blade syntax can be used within any file ending with the .blade.php extension. The main advantages of blade are that it allows for the use of template inheritance and sections. More can be read up on these two concepts via the Laravel documentation.

Blocks

As of Coaster CMS v5.4, All blocks can have multiple views in the themes/[theme_name]/blocks/[block_type] folder - this adds consistency to the block behaviour and also greatly enhances the flexibility of displaying certain block types such as string blocks. In addition, all block libraries "display" function will return strings and an additional PageBuilder function "blockData" will retrieve the data before it gets put through the block's display function should you need it.

{{ Pagebuilder::block('block_name', $options) }}

Method options ($options):

'page_id' => 6  (can override the page the block data is loaded from [will always be current page unless otherwise specified])

Browse the block types in the sidemenu for more details about the available block types and how to implement them starting with basic string and link blocks.

Custom Block Types 

Custom block types can be added fairly easily.

Coaster will look for custom Block classes in the projects app/Blocks/ folder. These should extend the base block class.

Modern Framework

Based on Laravel 5

Constant development

Additional features always being planned/researched

Open source

"git" involved

Latest from the blog


read more


read more


read more