{!! PageBuilder::block($block_name, $options) !!}
ie. {!! PageBuilder::block('banners', ['view' => 'home_banners']) !!}
'view' => 'home_banners' (default: is the block_name)
'random' => 2 (default: off, can set to pull back a number of randomly selected repeater rows in a random order)
'per_page' => 5 (default: off, can add pagination if there are lots of rows)
'cols' => '6' (default: 1, can set to 2 to pull back odd and even rows)
'column' => '5' (default: 1, if above is set to 2, then 1 will pull back odd rows and 2 even)
/blocks/repeaters/[repeater_view].blade.php
repeater view is the block name unless set otherwise by the view variable
$id (int - repeaters id)
$is_first (bool - check if first repeater row)
$is_last (bool - check if last repeater row)
$count (int - gets total number of repeater rows)
$total (int - total number of repeater rows)
$pagination or $links (string - returns the pagination links)
The banners block is completely optional and is a good example of Coaster's repeater functionality.
@if ($is_first)
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
@for ($i = 0; $i < $total; $i++)
<li data-target="#carousel-example-generic" data-slide-to="{!! $i !!}"{!! ($i==0)?' class="active"':'' !!}></li>
@endfor
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner dupa">
@endif
<div class="item {!! ($count==1)?'active':'' !!} car{!! $count !!}">
<div class="carousel-caption">
<h1>{!! PageBuilder::block('slide_title') !!}</h1>
<a href="{!! PageBuilder::block('slide_link') !!}" class="btn btn-primary" >Find out more</a>
</div>
</div>
@if ($is_last)
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
@endif
The first part of this view is composed between the $is_first conditional statement. The code in this statement will be executed once, this is often done to prevent the whole section from repeating itself with
In Coaster 5.3, we introduced a feature for creating forms for frontend users to submit content to repeaters (like the comments form in the Coaster206 theme).
To do this,
Based on Laravel 5
Additional features always being planned/researched
"git" involved
Announcing (belatedly) Coaster CMS version 5.5...
So, somewhat belatedly we have launched Coaster CMS version 5.5, which is now based on Laravel v5.5 (LTS) and mostly includes a major "under the hood" update that will make Coaster more stable and als...
Coaster CMS v5.4 is here
So, Coaster CMS v5.4 has arrived and I'm just going to give you an overview of the new features. We think this update will really help people grasp the concepts around Coaster and give you ideas o...
Where is Data Stored in Coaster CMS
We've had a couple of discussions recently with people trying to understand the data structure of Coaster and more specifically, where data is stored in Coaster CMS and I thought I'd summarise some of...