incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Pablo Santos Rodríguez <juanpablo.san...@gmail.com>
Subject Re: Default content in new wiki pages
Date Sun, 16 Sep 2012 22:26:53 GMT
Hi Dave,

there isn't a switch to insert custom content, so you'd have to modify
JSPWiki source. You can play with usertext variable at
$SVN_TRUNK/src/webdocs/templates/default/editors/plain.jsp (definition at
line 27), adding something like:

<wiki:NoSuchPage>
  usertext = "DEFAULT_INIT_CONTENT"
</wiki:NoSuchPage>
near line 60 or just reuse the block in lines 30 - 51, for example.

If you want to enforce the initial content no matter what is inserted, then
the way to go could be a custom PageFilter. Take a look at the
$SVN_TRUNK/org/apache/wiki/filters/ProfanityFilter for an example.


HTH,
juan pablo


On Sun, Sep 16, 2012 at 9:15 AM, Dave Koelmeyer <
dave.koelmeyer@davekoelmeyer.co.nz> wrote:

> Hi All,
>
> In what file do I define default content for new wiki pages?
>
> For example, if I want to insert a table of contents in every new page by
> including "[{TableOfContents numbered='yes'}]" etc. where would this be set?
>
> Thanks for any pointers :)
>
> --
> Dave Koelmeyer
> http://www.davekoelmeyer.co.nz
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message