}
protected void preparePages(List<DocElement> elements) {
for (DocElement element : elements) {
if (element instanceof DocMenu) {
DocMenu menu = (DocMenu) element;
for (int i = 0, maxIndex = menu.elements.size() - 1; i <= maxIndex; i++) {
DocElement subElement = menu.elements.get(i);
if (subElement instanceof DocPage) {
prepareTemplatePage((DocPage) subElement);