Hello altogether!
I have a one-pager built according to the Kirby documentation. When I don’t introduce a redirect in the default.php page it is possible to display the content of sections as pages - for instance with the panel preview. Is it possible to take advantage of this behaviour for displaying the site as a multipage site (instead of a one-pager) on a mobile phone? That could be nice to avoid long scrolling ways, and the “feel” on a small device.
So there should be some kind of redirect on mobiles that replaces the standard home.php with another template.
I imagine something like
if($page->isHomePage() && $page->isMobile(){
echo (url('intro'));
} else {
echo url());
}
What is the proper PHP? And where do I place it without creating an unwanted loop?