incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Dupriez <christophe.dupr...@destin.be>
Subject Aliasing long Wiki markup
Date Fri, 15 Feb 2008 08:10:32 GMT
Hi Again!

When users are putting often the same long markup sequences, it may be 
useful to define "aliases".

Attached modifications allows to:

1) define aliases in jspwiki.properties. For instance:
   #Applications shortcuts
   alias.citedby=[{ReferringPagesPlugin title='!Cited by:%n' 
exclude='Main,LeftMenu'}]

2) Call those alliases in pages: the syntax is the same than for 
variable inclusion but a "$" sign is added at the end.
   For instance: [{$citedby$}]
   The WikiMarkup inside the alias is interpreted.

The nice thing is also that you can change the definition of an Alias 
without changing the wiki pages...

Final note: \n is allowed in jspwiki.properties to indicate a end of 
line (\n\n for end of paragraph)

Attached source code is for 2.6.1. VariableContent.java is in the 
"parser" directory.

Have a nice day!

Christophe

Mime
View raw message