Is there any way to override templates per page?

After reading source, it seems to me that there is not.
Apparently, html_additional_pages are used for other purposes and
cannot be used for this because empty context is passed to the
handler:

./html.py-494-        # additional pages from conf.py
./html.py-495-        for pagename, template in
self.config.html_additional_pages.items():
./html.py-496-            self.info(' '+pagename, nonl=1)
./html.py:497:             self.handle_page(pagename, {}, template)

Perhaps a template name should be passed to handle_page -method in
write_doc? Now it is not passed and default 'page.html' is used for
every page:

./html.py:365:        self.handle_page(docname, ctx,
event_arg=doctree)

./html.py:642:    def handle_page(self, pagename, addctx,
templatename='page.html', outfilename=None, event_arg=None):

And then template names could be defined in config-file:

html_templates = {'pagename': 'template.html'}

page.html would be still default if overriding templates are not
provided.

What do you think?

--
Tuomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to