Support the ongoing development of Laravel.io →
Views Blade Packages
Last updated 1 year ago.
0

So master.blade.php

<!DOCTYPE html>
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\""; ?>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="fr" lang="fr" dir="ltr">
<head>
...    <meta name="description" content="Free web application: file management and notes">
    <meta name="keywords" content="Text, Image, Audio, Video">
    <script language="JavaScript">
... @section('header') // additional headers (per page)
    @show
    @stop
    @section("pagelogo", "/images/applogo.png")
</head>
<body>

@include("note.tree", ["noteId" => $noteId]) // Navigation in the application

<div id="sidebar">
    <ul id="profile_info">
    <?php
    if (Auth::check())
        {?>
...
        @section('sidebar')


            @include("menu")
@show
@stop
        <li><a id="minimize_button" onclick="hideMenuProfile();" class="btn-large btn-primary openbutton">Minimize</a>
        </li>
    </ul>
    <a id="maximize_button" class="btn-large btn-primary openbutton" onclick="showMenuProfile();">Maximize</a>

</div>
<div id="navbar">
    @section("navbar")
        @include("navigation.navbuttons")
        @include("navigation.history")
        <a onclick="history().back()"><−</a><a onclick="history().next()">−></a>
    @show
    @stop
</div>

<div class="containerBlocnoteBrowser">
    <div id="top_container">

        <h1><img src="@yield('pagelogo')" height="2em" width="2em"/> @yield("title")</h1>
        @section("top")
        @endsection
    </div>

    @section('content')

    @show
    @stop
</div>

<div id="api"></div>
<!-- place in header of your html document -->
<script language="JavaScript" type="text/javascript" src="/js/tinyMCE.init.js"></script>
<a href="https://mixpanel.com/f/partner"; rel="nofollow"><img
            src="//cdn.mxpnl.com/site_media/images/partner/badge_light.png" alt="Mobile Analytics"/></a>
</body>

After the skeleton, the list.blade.php (folder views, with icons, like Operating Systems)

@extends('master')
@section('header')
    
    <script language="JavaScript">
        mixpanel.track("Navigation dans l'application", {"User": "{{  Auth::user()->email }}", "note" : noteId });
    </script>

@show
@stop

@section('title', 'Parcourir les notes dans ' . getField(getDocRow($noteId), 'folder_id'))
@section('sidebar')
    
    @include("menu", ["noteId", $noteId])
@show

@stop


@section('content')
    

    @include("note/list/vue_liste", array("noteId" => $noteId, "serialized_data" => $serialized_data, "filtre" => $filtre))

@show

@stop

The html view of the "File Browser Window" vue_liste.blade.php

@extends("master")
@section("content")

    <div class="browserContainer">

// Action Buttons on files 

        <?php

        $assoc = unserialize($serialized_data);

        ?>

        @section("files")

        @foreach($assoc as $tab)
            @include("note/vue_fichier", array("filename" => $tab['filename'],
            "content" => $tab['content'], "id" => $tab['id'], "folderId" => $tab['folder_id'], "noteId" => $tab['id'], "folder_id" => $tab['folder_id'],
            "mimeType" => $tab['mimeType'], "isDirectory" => $tab['isDirectory'], "sqlStmt" => getLastestSQLStmt()))
        @endforeach
        @show
        @endsection

    </div>
@show

And last but not least:

<strong> Here why master template inheritance doesn't work</strong>
@section("files")

        <!-- Vue Fichier -->
<div class='vue_fichier_vue_normale'>
 <!-- Here full design of the file thumbnail box.
</div>

The result of this is a full page-breakup. not in order

Last updated 8 years ago.
0

A question regarding my problems= When a template extends another, should that template redefine all of the section (html fixed for all pages)?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

mdahmen mdahmen Joined 1 Aug 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.