Wenzel, Norbert wrote:
Hi,I was wondering how to create linked images in a wiki page and to mysurprise found the following: [[Image(example.jpg, link=http://example.org)]]I would consider it more straightforward to write links and images asusual. That would result in the following code: [http://example.org [[Image(example.jpg)]] ]That would mean the link macro would interpret the first part as a linkand the second part as normal wiki text, which is processed by the wiki engine. Therefore the image macro wouldn' t have to deal with linksitself. I use a trac installation with a lot of extensions and found everyextension writing it's own markup code. With recursive macro replacement a chart drawing plugin might create an image, attach it to the wiki page and replace itself with [[Image(generatedChart.png)]] and tell trac to reparse it's result. Therefore all links would be created by only one macro which could easily be adopted to ones needs.
This is recursive, just in the other direction. [[Image(file.png, link=[ticket:32 The ticket])]] is quite valid. It processes the link using the wiki formatter.
--Noah
signature.asc
Description: OpenPGP digital signature
