Use A Different Layout For The Start Page

De Switzerland
Membro desde abr 2025

Has anyone tried this procedure recently? (see picture)

I found this procedure on the (how to create a template wiki page).

Use A Different Layout For The Start Page
It suggests creating a new layout file: ~/includes/templates/mytheme.catalog/layouts/index.inc.php.
Then, in ~/pages/index.inc.php, adding the following line:

<?php
  document::$layout = 'index';
?>

However, it doesn't seem to work properly. The new layout file (index.inc.php) is being called, but it seems to be loaded completely on its own — meaning that other includes like config.inc.php, app_header.inc.php, etc., are missing.

Has anyone successfully implemented this recently?
Thanks in advance for your feedback!

tim
Founder
De Sweden
Membro desde mai 2013
tim

So, /pages/index.inc.php gets it's includes from the parent script which is /index.php.

Clone /includes/templates/mytheme.catalog/layouts/default.inc.php to /includes/templates/mytheme.catalog/layouts/index.inc.php to make sure you start out with a layout that has all elements needed.

De Switzerland
Membro desde abr 2025

Perfect thanks! It was my misunderstanding of the layouts architecture.

Tu
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.