1
0
Fork 0

[FIX] fix blueprint titles + new head title format

This commit is contained in:
Jannik Beyerstedt 2016-04-05 23:56:20 +02:00
parent c79ea83e0d
commit 35fed453f1
4 changed files with 14 additions and 8 deletions

View file

@ -1,6 +1,8 @@
title: Page
title: default Page
pages: true
files: true
fields:
title:
label: Title

View file

@ -1,4 +1,4 @@
title: Page
title: Home
pages: true
files: true

View file

@ -1,4 +1,4 @@
title: Page
title: redirect
pages: true
files: false

View file

@ -5,17 +5,21 @@
// copyright: Jannik Beyerstedt | https://jannikbeyerstedt.de
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
// -------------------------------------------
if( $page->isHomePage() ) {
$title = $site->title()->html();
}else if ($page->depth() == 2) {
$title = $page->parent()->title()->html().': '.$page->title()->html().' | '.$site->title()->html();
}else {
$title = $page->title()->html().' | '.$site->title()->html();
}
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<?php if( $page->isHomePage() ) : ?>
<title><?php echo $site->title()->html() ?> </title>
<?php else : ?>
<title><?php echo $site->title()->html() ?> | <?php echo $page->title()->html() ?></title>
<?php endif; ?>
<title><?php echo $title ?> </title>
<meta name="description" content="<?php echo $site->description()->html() ?>">
<meta name="keywords" content="<?php echo $site->keywords()->html() ?>">
<meta name="author" content="<?php echo $site->author()->html() ?>" >