Useful Methods

Below is a list of useful functions and features within coaster for you to try out and also as a reference for when you need a reminder of what does what.

Get Current Page Id

{{ Pagebuilder::page_id() }}

Returns null if 404 page or external.

Get Parent Page Id 

{{ Pagebuilder::parent_id() }}

Returns null if no parent exists.

Get Current Page Name

{{ Pagebuilder::page_name($page_id) }}

Returns page name for a page_id. If no page_id set, returns current page name.

Get Current Page Url

{{ Pagebuilder::page_url($page_id) }}

Returns full url for a page_id. If no page_id set, returns current page url.

Get Current Template Id

{{ Pagebuilder::page_template_id() }}

Returns the id of the current template, if no template is set (ie. on a 404 page) will return null

Breadcrumbs

{!! Pagebuilder::breadcrumb($options = array()) !!}

Will return and format the page path using the templates:

/breadcrumbs/[view_name]/active_element.blade.php (last item in breadcrumb trail ie. current page)

/breadcrumbs/[view_name]/link_element.blade.php (higher level crumbs)

/breadcrumbs/[view_name]/separator.blade.php (separator html)

/breadcrumbs/[view_name]/wrap.blade.php (html to wrap around the crumbs)

Available options:

 'view' => 'default' (default: default)

Sitemap

{!! Pagebuilder::sitemap($options = array()) !!}

Same as options/variables as category function just loads all top level pages.

Feeds (rss,xml, json, ...)

Any template can have a corresponding template used as a feed:

/feed/[view].blade.php

ie. /feed/xml/sitemap.blade.php

Then any page using a template with a corresponding feed template can be accessed via:

/.[extension] ie. /sitemap.xml

Fetch Settings/Config Values:

Laravel 5:   config('coaster::')      ie.    config('coaster::site.name')

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