Blade sections

You can easily use Blade sections to customize your pages. There are two ways to use blade sections:

  • When you override a view and create a new blade file.

  • Modifying Uccello layout located at resources/views/layouts/uccello.blade.php.

Common sections

Here the list of blade sections common to all uccello pages:

Page title

// <title>@yield('title', config('app.name', 'Uccello'))</title>

@section('title', 'My custom page title')

Page name

This is principally used by JavaScript for doing lazy loading.

// <meta name="page" content="@yield('page')">

@section('page', 'index')

Page meta

Useful to configure some parameters to use with JavaScript and jQuery!

Favicon

Base href

CSS files

CSS classes

Pre-content

This is where page header, menu, sidenav, loader... are defined.

Content container

Content CSS classes

Content

Even if extra-content section is not necessary, it can be used to add for example some HTML code at the bottom of the page (e.g. modal content).

Post-content

Add custom code after <main>...</main>.

Translations

This blade section is useful to add translations used by JavaScript. You could for example use the thepinecode/i18n library and add your translations to the page using this section.

JavaScript files

Last updated

Was this helpful?