PHP Classes

File: views/shared/_layout.php

Recommend this page to a friend!
  Classes of Aleksey  >  PHP Framework Bootstrap 4 Template  >  views/shared/_layout.php  >  Download  
File: views/shared/_layout.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Framework Bootstrap 4 Template
Show application pages using Bootstrap templates
Author: By
Last change:
Date: 9 months ago
Size: 2,483 bytes


Class file image Download
use PhpMvc\Html, PhpMvc\View;
<!DOCTYPE html>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title><?=Html::getTitle()?> - My Application</title>
    <link rel="stylesheet" href="/vendor/twbs/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/content/styles/app.css" />
    <script src="/vendor/components/jquery/jquery.min.js" type="text/javascript"></script>
    <script src="/vendor/twbs/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
        <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
            <div class="container">
                <?=Html::actionLink('My Application', 'index', 'home', null, array('class' => 'navbar-brand'))?>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                <div class="collapse navbar-collapse" id="navbarText">
                    <ul class="navbar-nav mr-auto">
                        <li class="nav-item"><?=Html::actionLink('Home', 'index', 'home', null, array('class' => 'nav-link'))?></li>
                        <li class="nav-item"><?=Html::actionLink('About', 'about', 'home', null, array('class' => 'nav-link'))?></li>
                        <li class="nav-item"><?=Html::actionLink('Contact', 'contact', 'home', null, array('class' => 'nav-link'))?></li>
// render partial view ~/views/shared/_login.php

    <div class="container">
// render current view

    <hr />

        <div class="container">
            Copyright &copy; My Application, <?=date('Y')?><br />
                This page is created in <?=round(microtime(true) - PhpMvc\HttpContext::getCurrent()->getRequest()->server('REQUEST_TIME_FLOAT'), 5)?> seconds
                <br />
                PHP v<?=phpversion()?> &middot; PHP MVC Project v<?=PhpMvc\Info::VERSION?>

For more information send a message to info at phpclasses dot org.