[Zope3-Users] reStructuredText sections question

Thierry Florac thierry.florac at onf.fr
Wed Apr 14 04:37:06 EDT 2010


Sorry for cross-posting but I don't know where to ask for this little

I use reST to produce contents which can be :
 - generated as standalone HTML pages
 - included into an existing CMS (via Zope3)

While generating HTML from my CMS, how can I produce sections headers
starting, for example, as "H3" headers instead of "H1" ?
I've seen in Zope3 reST renderer this kind of code :

    def render(self):
        settings_overrides = {
            'halt_level': 6,
            'input_encoding': 'unicode',
            'output_encoding': 'unicode',
            'initial_header_level': 3
        writer = Writer()
        writer.translator_class = ZopeTranslator
        html = docutils.core.publish_string(
        return html

I suppose that "initial_header_level=3" allows to handle my use case,
but apparently it doesn't work...

Any hint ?
I'm currently using Zope-3.4 KGS, with zope.app.renderer-3.4.0 and

Chef de projets intranet/internet
Office National des Forêts - Département Informatique
2, Avenue de Saint-Mandé
75570 Paris Cedex 12
Tél. : 01 40 19 59 64
Fax. : 01 40 19 58 85
Mél. : thierry.florac at onf.fr
Web. : http://www.onf.fr

More information about the Zope3-users mailing list