Andreas Kuckartz wrote:
// iterate over brick groups and include them
brickGroups = wall.getBrickGroups();
for (i = 0; i < brickGroups.size(); i++) {
sling.include(brickGroups.get(i).getPath());
}
It is OT but in such a situation one probably could/should use a for-each loop
instead:
for (BrickGroup brickGroup : wall.getBrickGroups()){
sling.include(brickGroup.getPath());
}
Cheers,
Andreas
thanks, that gives the hint to the problem.....
I made a test and changed wall/html.esp as seen below.
i before include is "1" and after include its "3".
So "i" of the wall is changed by having also "i" in brickgroup
template.....
---------------------------
brickGroups = wall.getBrickGroups();
for (i = 0; i < brickGroups.size(); i++) {
%>
i before include <%= i %><br/>
<%
sling.include(brickGroups.get(i).getPath());
%>
i after include <%= i %><br/>
<%
}
-----------------------
Wondering if this is a bug or a feature ?
Markus
--
------------------------------------------------------------------
DIG Digitale Medienberatungs-
und Produktions- GmbH
Neckarstr. 1/5
78727 Oberndorf a. N.
Amtsgericht Stuttgart HRB 480914
Geschäftsführer: Carsten Huber
------------------------------------------------------------------
Tel: +49 (0)7423 8750 60
Fax: +49 (0)7423 8750 23
Internet: http://www.dig.de
eMail: pa...@dig.de
Ein Unternehmen der Schwarzwälder Bote Mediengruppe