Selects

DOCS MENU

Select Block

{{ PageBuilder::block($block_name, $options) }}

ie. {{ PageBuilder::block('colour') }}

returns option value

Options

In the theme admin section, you can manage select fields via the "Manage block select options" link. Here you can add option names and values.

Database setup for admin select:

Option values can be entered into the database table "block_selectopts" (in a future release, these will be manageable through the admin)

Note: if the option values are hexidecimal colour codes it will add the colour to the dropdown

Select Multiple Block

{{ PageBuilder::block($block_name, $options) }}

ie. @foreach (PageBuilder::block('colours') as $colour)

returns array of option values

Database setup for admin select:

Currently requires option values to be entered into the database table "block_selectopts"

Note: if the option values are hexidecimal colour codes it will add the colour to the dropdown

Select Page Block

{{ PageBuilder::block($block_name, $options) }}

ie. {{ PageBuilder::block('link_page') }}

returns selected page id

Select Multiple Pages Block

{!! PageBuilder::block($block_name, $options) !!}

ie. {!! PageBuilder::block('interesting_pages', ['view' => 'thingy']) !!}

returns select pages template

Method options ($options):

'view' => 'custom' (defaut: is the block name)

'reverse' => true (default: will pass selected pages to the select page template, however if set to true it will pass any page that has the current page id selected in this block)

Template Location:

/blocks/selectpages/[template].blade.php

template is the block name unless a customer view is specified

Avaliable Variables:

$pages (array of stdClass below)

$page->id (int - page id)

$page->name (string - page name)

$page->full_name (string - page name with full path)

$page->url (string - page url)

example:

@foreach($pages as $page)
<li><a href="{{ $page->url }}" title="{{ $page->name }}">{{ $page->name }}</a></li>
@endforeach

Modern Framework

Based on Laravel 5.3

Constant development

Additional features always being planned/researched

3

Years in development

Latest from the blog


read more

read more

read more