[opencms-dev] Index page on fresh mercury website

Michael Emmerich m.emmerich at alkacon.com
Fri Aug 1 08:02:47 CEST 2025


Hello Laurent,

thanks for your feedback. We have a chicken and the egg problem here:

The initial "index.html" was created before you have made the template 
model and therefore it is just an empty containerpage.

If you create a new page with the sitemap edtior using one of your 
template models there, the template model is copied as the "index.html" 
of the new page (and some adjustments are made regarding the elements 
already on the template model). This means, if you change a template 
model after you created some pages, his has NO effect on pages that were 
created with this template model before.

But how to solve you problem?

The easiest solution is the following:

- go to the siteamap editor

- create a new page using your template model. Keep the default name "page"

- go to the explorer

- delete the index.html containerpage that is directly in your site, i.e 
"/index.html"

- now mode the "index.html" file that is in your "/page/" folder one 
level up, i.e. "/page/index.html" -> "/index.html"

- delete the now empty "/page/" folder

-> Done.


I will update the dev-blog with this as well.


Kind regards,

Michael


Am 31.07.25 um 23:28 schrieb laurent.druart via opencms-dev:
> Hello,
>
> I’m following the this tutorial to create a test website with the 
> Mercury template: 
> https://www.opencms.org/en/article/How-to-create-a-new-website-using-the-Mercury-template/
>
> I can create pages with the default model template but the main page, 
> index.html, created by OpenCMS before definition of my template model 
> can’t be associated with this model. How to do that?
>
> Thank you
>
> Regards,
>
> Laurent
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
-- 
Michael Emmerich

Alkacon Software GmbH & Co. KG - The OpenCms Experts
http://www.alkacon.com
http://www.opencms.org



More information about the opencms-dev mailing list