Skip to content

Commit e0850c8

Browse files
Merge pull request #63 from froschdesign/hotfix/js-html-redirect
Adds redirect for homepage via JS and HTML
2 parents 02fb0f5 + 6e3f1b6 commit e0850c8

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

templates/app/home-page.phtml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
<?php $this->layout('layout::layout', []) ?>
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* @var League\Plates\Template\Template $this
7+
*/
8+
9+
$this->layout('layout::default', ['redirect' => true]);
10+
?>
211

312
<div class="row">
413
<div class="col-md-2 col-sm-12">

templates/layout/layout.phtml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* @var League\Plates\Template\Template $this
7+
* @var string $title
8+
* @var bool|null $redirect
9+
*/
10+
?>
111
<!DOCTYPE html>
212
<html lang="en">
313

@@ -10,6 +20,11 @@
1020

1121
<title><?= $title ?? 'Laminas: Components and MVC for Enterprise Applications' ?></title>
1222
<link rel="stylesheet" href="/css/styles.css">
23+
24+
<?php if (isset($redirect) && $redirect === true) : ?>
25+
<script>location.href = 'https://getlaminas.org'</script>
26+
<meta http-equiv="refresh" content="0; url=https://getlaminas.org">
27+
<?php endif ?>
1328
</head>
1429
<body id="page-top" class="laminas">
1530
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">

0 commit comments

Comments
 (0)