[Pmwiki-users] action=source ignored; PmWiki "macros" and [[include:]]

Jesse Jacobsen selnecker
Tue Jun 1 23:10:03 CDT 2004


Dear PmWiki-users,

I have newly subscribed to the list, after my previous attempt at
posting apparently didn't work.  I have two questions.

1.  What would cause current versions of PmWiki to ignore
"&action=source"?  Other actions (edit, crypt) work fine, but it seems
PmWiki doesn't recognize source.  You can try it yourself at
http://www.grace-els.org/boc/pmwiki.php?pagename=Main.HomePage

2.  On the site above, I'm experimenting with using [[include:...]]s as
a kind of macro simplification for nicer repetition of some uglier
AdvancedTables code.  It seems to work well enough, though it uses
multiple pages to do it.  Is this an intended application, or is there a
better way to do macro substitution in PmWiki?  For example, it might
seem less brutish to assign a piece of arbitrary text/code to some token
for later expansion.  The [[include:page#from#to]] idea (especially some of
the things I read on the list archives) comes close, but it seems that
the current implementation forces the "macro" call to know either the
length of the included piece or the next anchor name on the included
page.  Just for example, here's the sort of macro expansion that would
work well for me, with some randomly chosen markup.

@@tstarttoken@@ 
[[table width=100%]]
[[cell width=35% valign=top]]
@@

...

[[@@tstarttoken@@]]
 Cell content...
[[@@tnextcell@@]]
 Cell content
[[@@tend@@]]

As an alternative, if a [[include:page#from]] variant included
everything in the following "paragraph" (up to at least two newlines
without intervening space?) it would serve the same general purpose.
Even better if it included everything up to some marker like
[[endinclude]].

Best Regards,

Jesse Jacobsen




More information about the pmwiki-users mailing list