[opencms-dev] Modelgroup
laurent.druart
laurent.druart at ldict.be
Fri Aug 15 14:41:10 CEST 2025
Hello,
I would like to have two variations of my template, each with a different footer. So I'm thinking of using "model groups" and "template models." In my JSP template, I have a "container" section to define my footer.
<cms:container name="footer-modelgroup">
<div class="my-container-border">
<h3>Container du footer</h3>
<p>Déposez ici votre model group (footer).</p>
</div>
</cms:container>
For my model groups I created a footer.jsp template in my module that only includes a container section:
<%@page taglibs="c,cms" %>
<%@page buffer="none" session="false" trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<cms:enable-ade/>
<div class="footer container-xxl">
<cms:container name="footer">
<div class="my-container-border">
<h3>Container du footer</h3>
<p>Déposez ici vos différents contenus.</p>
</div>
</cms:container>
</div>
I created a model group in the sitemap editor that I associated with the footer.jsp template.
I then want to associate each model group in my template models, but I can't define content in my model groups, the "container" section is inactive.
What have I forgotten? Is my understanding of model groups correct?
Thanks for your help,
Kind regards,
Laurent
More information about the opencms-dev
mailing list