Last active
November 19, 2018 17:18
-
-
Save petehouston/ea72e301e4247c5ed34c to your computer and use it in GitHub Desktop.
[Laravel 4.2] Layout master page in Blade template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{-- file: /app/views/layouts/master.blade.php --}} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
{{-- Part: all meta-related contents --}} | |
@yield('head-meta') | |
{{-- Part: site title with default value in parent --}} | |
@section('head-title') | |
<title>Site title</title> | |
@stop | |
{{-- Part: load fonts --}} | |
@yield('head-fonts') | |
{{-- Part: load styles for the page --}} | |
@yield('head-styles') | |
{{-- Part: load scripts needed --}} | |
@yield('head-scripts') | |
{{-- Part: anything else in head --}} | |
@yield('head-extra') | |
</head> | |
<body> | |
{{-- Part: something at start of body --}} | |
@yield('body-start') | |
{{-- Part: header of body --}} | |
@section('body-header') | |
{{-- Part: navigation bar --}} | |
@include('partials.navbar') | |
@show | |
{{-- Part: create main content of the page --}} | |
@yield('body-content') | |
{{-- Part: footer --}} | |
@section('body-footer') | |
{{-- Part: footer is probably shared across many pages --}} | |
@include('partials.footer') | |
@show | |
{{-- Part: load scripts --}} | |
@yield('body-scripts') | |
{{-- Part: something else to do --}} | |
@yield('body-others') | |
{{-- Part: finalize stuffs if there is --}} | |
@yield('body-end') | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment