Skip to content

Commit

Permalink
Merge pull request #63 from froschdesign/hotfix/js-html-redirect
Browse files Browse the repository at this point in the history
Adds redirect for homepage via JS and HTML
  • Loading branch information
weierophinney committed Apr 4, 2024
2 parents 02fb0f5 + 6e3f1b6 commit e0850c8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
11 changes: 10 additions & 1 deletion templates/app/home-page.phtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<?php $this->layout('layout::layout', []) ?>
<?php

declare(strict_types=1);

/**
* @var League\Plates\Template\Template $this
*/

$this->layout('layout::default', ['redirect' => true]);
?>

<div class="row">
<div class="col-md-2 col-sm-12">
Expand Down
15 changes: 15 additions & 0 deletions templates/layout/layout.phtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<?php

declare(strict_types=1);

/**
* @var League\Plates\Template\Template $this
* @var string $title
* @var bool|null $redirect
*/
?>
<!DOCTYPE html>
<html lang="en">

Expand All @@ -10,6 +20,11 @@

<title><?= $title ?? 'Laminas: Components and MVC for Enterprise Applications' ?></title>
<link rel="stylesheet" href="/css/styles.css">

<?php if (isset($redirect) && $redirect === true) : ?>
<script>location.href = 'https://getlaminas.org'</script>
<meta http-equiv="refresh" content="0; url=https://getlaminas.org">
<?php endif ?>
</head>
<body id="page-top" class="laminas">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
Expand Down

0 comments on commit e0850c8

Please sign in to comment.