mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-23 09:13:07 +01:00
Use Page::metadata()
from templates
This commit is contained in:
parent
45270012e7
commit
9b5abe9d3c
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= $site->lang() ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?= $page->title() ?> | <?= $site->title() ?></title>
|
||||
<?= $this->insert('_meta') ?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="<?= $this->assets()->uri('css/style.min.css') ?>">
|
||||
<script src="<?= $this->assets()->uri('js/script.min.js') ?>"></script>
|
||||
|
9
templates/partials/meta.php
Normal file
9
templates/partials/meta.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php foreach ($page->metadata() as $meta): ?>
|
||||
<?php if ($meta->isCharset()): ?>
|
||||
<meta charset="<?= $meta->content() ?>">
|
||||
<?php elseif ($meta->isHTTPEquiv()): ?>
|
||||
<meta http-equiv="<?= $meta->name() ?>" content="<?= $meta->content() ?>">
|
||||
<?php else: ?>
|
||||
<meta <?= $meta->namespace() === 'og' ? 'property' : 'name' ?>="<?= $meta->name() ?>" content="<?= $meta->content() ?>">
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
Loading…
x
Reference in New Issue
Block a user