[Rest2web-develop] gallery plugin improvements
Brought to you by:
mjfoord
From: Yuri D'E. <wa...@th...> - 2010-03-21 16:50:09
|
Hi everyone. I've made some modifications to the gallery plugin that I would like to share. I've made optional the "page_template" parameter: if not set, a direct link to the image is made. I've switched the "cgi.replace" (and the ugly ** escapes) to use "embedded_code" like everywhere else. The thumbnails are now regenerated only when needed, not at every invocation. The plugin is attached as "gallery2", since the templates are not directly compatible with the old ones. The plugin works otherwise the same. I tried to make the plugin system work on "rest" files by using substitution references (which look like this: |gallery|). I raised the question in the docutils ML, but without much success: http://article.gmane.org/gmane.text.docutils.user/5619 The proposed solution to define the substitutions by concatenating text work (of course), but you cannot define 'raw html' in the substitution: .. |sub| replace:: .. raw:: html test thus making them much less useful for that purpose. Bests |