Hamburger menu.
Download ZIP file and copy it into your system/extensions
folder. Learn more about extensions.
The hambuger menu is created by the layout system/layouts/burger.html
. In order to use it you can do either of the following:
system/layouts/navigation.html
system/layouts/header.html
change $this->yellow->layout("navigation")
to $this->yellow->layout("burger")
If a page contains subpages (e.g. /page/subpage1/
, /page/subpage2/
etc.), it is a good idea not to put any relevant content in it and to make it not selectable in menu, since it is often overlooked by users. To make such a "transit" page, put at its top the Layout: transit
setting.
A header layout that uses a hamburger menu:
<!DOCTYPE html>
<html lang="<?php echo $this->yellow->page->getHtml("language") ?>">
<head>
<title><?php echo $this->yellow->page->getHtml("titleHeader") ?></title>
<meta charset="utf-8" />
<meta name="description" content="<?php echo $this->yellow->page->getHtml("description") ?>" />
<meta name="author" content="<?php echo $this->yellow->page->getHtml("author") ?>" />
<meta name="generator" content="Datenstrom Yellow" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php echo $this->yellow->page->getExtraHtml("header") ?>
</head>
<body>
<div class="<?php echo "page layout-".$this->yellow->page->getHtml("layout") ?>">
<div class="header" role="banner">
<div class="sitename">
<h1><a href="https://github.com/GiovanniSalmeri/yellow-burger/blob/main/<?php echo $this->yellow->page->getBase(true)."/" ?>"><i class="sitename-logo"></i><?php echo $this->yellow->page->getHtml("sitename") ?></a></h1>
<?php echo $this->yellow->page->getPage("header")->getContentHtml() ?>
</div>
<div class="sitename-banner"></div>
<?php $this->yellow->layout("burger") ?>
</div>
A transit page with no content:
---
Title: Members' pages
Layout: transit
---
This extension uses mmenu-light by Fred Heusschen, licensed under the CC-BY-4.0 license. Thank you for the good work.
Giovanni Salmeri. Get help.