[opencms-dev] Guidance needed: Mercury template vs. Custom template
Michael Emmerich
m.emmerich at alkacon.com
Wed Jul 30 09:51:37 CEST 2025
Hello Nivedita,
You're looking to set up a /main website/ for the headquarters and a
/subsite for each school/. If each school’s website follows a similar
layout, it’s best to create a *blueprint* (or base template) that can be
duplicated for each school.
There are two key areas you should focus on:
1.
The general concept of pages with *Mercury*
2.
The use of the *Sitemap Editor* to build the site structure
1. Understanding Mercury Page Concepts
You've already followed the dev-block instructions to set up your site,
which included creating a *header*, *footer*, and a base
*template-model*. This model defines the global layout shared by all
pages (i.e., consistent header and footer). Between these sections lies
the *content area*, where Mercury's page grid comes into play.
Mercury is built on *Bootstrap*, so it uses a *12-column grid* system.
This allows you to divide each page into rows and columns, where content
elements are placed.
Example Layout
Suppose you want a layout like this:
*
A full-width image slider at the top
*
Three teaser boxes side by side
*
A full-width text area at the bottom
Your row structure would look like:
*
*Row 1*: 1 column (12 columns wide)
*
*Row 2*: 3 columns (each 4 columns wide)
*
*Row 3*: 1 column (12 columns wide)
The numbers (12, 4-4-4, etc.) refer to how many of the 12 available grid
columns are used per container.
Adding Rows to a Page
After creating a new page via the Sitemap Editor (more on that below),
open it in the *Page Editor*, click *“Add Content” → “Template
Elements”*, and choose *“Layout Row”*.
You'll now see predefined layout options:
*
Single-column (12)
*
Two-column (e.g., 6-6, 8-4)
*
Three-column (4-4-4), etc.
Try out different options to see how they behave. You can add or remove
rows anytime. If you delete a row, all content inside it will also be
removed—so be sure to move any important elements to another row first.
Once your layout is in place, use *“Add Content” → “Content Elements”*
to drag and drop content blocks into the grid.
Optional: Predefine Grid Layouts
If you frequently use the same grid structure, you can define rows
/directly in the template-model/. That way, new pages created from this
template will already include the layout. You can even create multiple
template-models with different layouts.
Important: Editing the layout of a newly created page *does not affect*
the original template-model.
2. Creating the Site Structure with the Sitemap Editor
To build the site and navigation structure, always use the *Sitemap
Editor*, not the Explorer.
In OpenCms, the sitemap defines the structure and navigation of your
website. Here’s how to use it:
1.
Open the *Sitemap Editor*
2.
Click *“Add Pages”* in the toolbar
3.
Choose a *template-model*
4.
Drag the new page to your desired location and name it
The filename (URL) is automatically set based on the name you give.
You can reorder pages using the *"nine dots"* icon or nest one page
under another by dragging it onto the parent’s icon. This defines
hierarchical navigation (e.g., subpages).
Setting Up School Subsites
You could now use the sitemap editor to build the structure of your main
(headquarters) site. One page could be the entry for all your schools
subsites with a structure like this:
/schools/
/schools/school_1/
/schools/school_2/
/schools/school_3/
[...]
1.
Create a page called *"schools"*
2.
Under it, create a page *"school_1"*
3.
Open the "burger menu" of the *school_1* page (three lines icon),
and go to
*Advanced → Create Sub-Sitemap*
This turns *school_1* into its own *subsite* with a separate sitemap.
Clicking on it will open a *blank sitemap* for that school, where you
can create its individual pages.
Each subsite can have:
*
Its own template-models
*
Unique header/footer
*
Independent configuration
If none are defined, the parent’s templates and configurations are used.
Store Content Locally in Subsites
To ensure all content elements for a subsite are saved within it:
*
Open the subsite in the *Sitemap Editor*
*
Click the *burger menu* in the toolbar → *Advanced → Sitemap
Configuration*
*
Enable *"Local content elements"*
Final Tip
The best way to get familiar with Mercury and OpenCms is to experiment!
Create test pages, try different layouts, and explore the sitemap options.
Let me know if you need help with any specific step!
Kind regards,
Michael
Am 21.07.25 um 07:24 schrieb niveditasheoran via opencms-dev:
>
> Hi,
>
> I followed the step-by-step instructions provided in the link and
> successfully created a template of my own. As shown in the attached
> pictures, our firm used to manage a site with a headquarter and around
> 900–1000 sub-sites for individual schools.
>
> I am planning to develop something similar. Since the headquarters
> website is already in place, my idea is to start by building the
> homepage for one school and then replicate it for the others. These
> individual school sites will be linked from the headquarters site.
>
> However, I’m not sure where to begin—particularly when it comes to
> creating the homepage, which should include sections like a banner,
> About Us, statistics, Chairman's message, etc.
>
> Could someone please guide me through the process?
>
> Best regards,
>
> Nivedita
>
> On July 17, 2025 at 5:53 PM Michael Emmerich via opencms-dev
> <opencms-dev at opencms.org> wrote:
>>
>> Nivedita,
>>
>> I would suggest to use the Mercury template for this task. Making
>> your own template from scratch without any OpenCms experience can be
>> a bit challenging, I would only do this if there very special design
>> requirements that cannot be made with Mercury.
>>
>> In the Mercury template you have different content types that should
>> provide everything that is needed for a school website.
>>
>> Some time ago, I made a beginners step-by-step instruction how to
>> start a complete new website with Mercury, you can fin it here:
>>
>> https://www.opencms.org/en/article/How-to-create-a-new-website-using-the-Mercury-template/
>>
>> A place to look is the general OpenCms documentation here:
>> https://documentation.opencms.org/opencms-documentation/
>>
>> You find an explanation of the OpenCms workplace and several more
>> technical infos for developers.
>>
>> There is a very detailed documentation of the Mercury template,
>> explaining all the content types, their options etc. It can be found
>> here: https://mercury-template.opencms.org/
>>
>> This one is only available in German, so you would need some online
>> translation of it, for example the build in translation of Chrome.
>>
>> Kind regards,
>>
>> Michael
>>
>> Am 17.07.25 um 13:04 schrieb niveditasheoran via opencms-dev:
>>> Hi,
>>>
>>> I’m totally new to OpenCMS and have been tasked with creating a
>>> website for a school. I’m exploring whether I should use the
>>> *Mercury template* or build a *custom template* from scratch.
>>>
>>> Could someone guide me on what would be the recommended approach for
>>> a school website?
>>> Also, are there any *step-by-step guides or documentation* available
>>> to help with either option — especially for beginners?
>>>
>>> Any suggestions or resources would be really appreciated.
>>>
>>> Thanks in advance!
>>>
>>> Nivedita Sheoran
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------------------------------------
>>>
>>> [ C-DAC is on Social-Media too. Kindly follow us at:
>>> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>>>
>>> This e-mail is for the sole use of the intended recipient(s) and may
>>> contain confidential and privileged information. If you are not the
>>> intended recipient, please contact the sender by reply e-mail and
>>> destroy
>>> all copies and the original message. Any unauthorized review, use,
>>> disclosure, dissemination, forwarding, printing or copying of this
>>> email
>>> is strictly prohibited and appropriate legal action will be taken.
>>> ------------------------------------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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
>
>
>
>
>
>
> ------------------------------------------------------------------------------------------------------------
>
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> ------------------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20250730/1af09a56/attachment.htm>
More information about the opencms-dev
mailing list