File: D:/HostingSpaces/SBogers10/verrassendveel.komma.pro/wwwroot/app/views/partials/backButton.php
<?php
// Default link
$link = '/';
$label = 'Terug naar overzicht';
// Back buttons are on detail pages
// Usually you want to go back to the overview page
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
$sub = isset($_GET['sub']) ? $_GET['sub'] : '';
if($page != 'home') $link = '/' . $page;
// When on a shop detail page, there are multiple ways to get there
// We need to check were we come from
if($page == 'winkels' && isset($_GET['ref']))
{
$link = '/' . str_replace('-','/',$_GET['ref']);
$label = 'Terug';
}
// Return output
return '<a class="hover-button" href="' . $link . '">
<span class="btn-text-back">' . $label . '</span>
<span class="arrow-back btn-arrow-back"></span>
<span class="btn-green-288"></span>
<span class="btn-darkgreen-288 hover"></span>
</a>';