[opencms-dev] question about template problem

Andy Kriger akriger at greaterthanone.com
Wed Sep 29 18:40:52 CEST 2004


In this template...

<%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<html><head></head><body>
<cms:include page="/gto/inc1.html"/><br>
<br>
<cms:include element="body"/><br>
<br>
<cms:include page="/gto/inc2.html"/><br>
<br>
</body></html>

/gto/inc1.html and /gto/inc2.html are files in the same directory as the
page that is using this template, containing the text "Include File 1" or
"Include File 2". The page using the template has a body of "This is some
text". 

Viewing the page using the template, I would expect to see
Include File 1
This is some text
Include File 2

When I view this page, I see
Include File 1
Include File 1
Include File 2

If I move the <cms:include element="body"/> tag before the first include,
then I see
This is some text
Include File 1
Include File 2

So the body text of the page is definitely able to be found but the order of
include tags seems to affect things. Can anyone tell me why the inc1.html is
being duplicated? And how I might workaround this problem?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040929/89041add/attachment.htm>


More information about the opencms-dev mailing list