[pmwiki-devel] Creating site wide custom blocks

Sams, Weldon wsams at indiana.edu
Fri Dec 7 08:30:33 CST 2007


I hope this is readable, I've included a quick summary at the end.

I've been searching the documentation, but I can't figure out how to create custom blocks that can be accessed site wide. I've provided a link below that shows possible blocks, and the %define=box% syntax. I'd also rather not use [@ @], because I don't want the division to be preformatted.

http://tmp.wjsams.com/colors/

Is there a way to define all those blocks somewhere so that when I create a new wiki page, I can use them without having to include them from another page or explicitly writing them on the new page. My goal is to create a page, and immediately be able to use a syntax like

%red_box% [???  <------- Is there something like [@ but unformatted?
Here is a red box

with '''text'''.
???]

I'd like to be able to use wiki syntax inside the boxes too. I've also tried

%red_box% (:div:)
Here is a red box

with '''text'''.
(:divend:)

but that doesn't seem to work for the division block problem.

Another alternative that would be nice would be to have the syntax

{red_box}
Here is a red box

With '''text'''.
{/red_box}

This would be my preferred method but I'd probably have to write a recipe for that.

Any ideas on which direction I should go. I can explain more if needed.

Summary: I'm looking for two things: A way to define blocks globally, and unpreformatted text block syntax similar to [@ @] to apply to the block definition to.

Thanks for your help,

Weldon




More information about the pmwiki-devel mailing list