While working on problems related to bug:777 that I just reported, I found it would be really nice if the prependLine and appendLine attributes in ListPages allowed double quotes and line breaks.
I would propose standard PHP syntax for these options if possible. \n for newline and using the backslash character to escape double quotes and other characters in the string (\"). This would allow something like this to be possible (would also require a fix for bug:777):
[[module ListPages category="empdbf" order="_id" separate="no" prependLine="[[html]]\n<head>\n<script type='text/javascript'..."\n<body>\n<p style =\"color: red;\">Some paragraph text.</p>\n" appendLine="\n</body>\n[[/html]]"]]
ListPages output for the HTML block
[[/module]]
Or we could do something like this without a complicated hack to trick the parser. This example is from a post in the old bug tracker a few years ago:
[[module ListPages category="flickr" limit="5" order="random" separate="no" prependLine="[[gallery size=\"square\"]]" appendLine="[[/gallery]]"]]
: flickr:%%title%%
[[/module]]
I realize that granting this might break some existing pages, but you could run a query against millions of pages to convert all backslashes in those attributes to "\\, right? :)
Waht is with the "Universal Escape" : http://www.wikidot.com/doc:wiki-syntax#toc7 - does this help ?
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Rated up. This would be great!
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
If breaking pages is a concern with the escape character, nesting single quotes in double quotes a la Javascript might be simpler.
I'd been under the impression that this was already something we could do, but testing it today proved me wrong.