← Back to team overview

zim-wiki team mailing list archive

export template question

 

Hi,
I am trying to understand the variables and functions is available in the export template. One thing I am wondering is if it is possible to loop through the headings on a page and based on the text in a heading, or the level of that heading, the text below can be threated one way or another (usingthe IF and ELSIF conditionals)?
In the presentation template I see an example of how loop and conditional statements are used to create a table with the navigation. I am looking for something similar, e.g., using one type of div for all text, except when the header contains a certain text, or is of a certain level, in which case the text is defined by a different div type. Something along the lines:
For ... loop through all headingsIF heading contains the text 'block' (of is of a certain level, or...)
    <div class='alt'>        [text below that heading]    </div>ELSE    <div class='default'>        [text below the heading]    </div>END
END

Is this possible at all? And if so, could somebody point at an example how to implement this?

Cheers,
Paulo