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: Setting Page Attributes
Date Wed, 24 Apr 2013 21:45:45 GMT
Hi Jürgen,

you can add whatever attribute to the wikipage via WikiPage#setAttribute(
String, Object ) a shorthand method for WikiPage#getAttributes().put(
String, Object ), but it's up to the WikiPageProvider which attribute(s)
get saved. For instance, FileSystemProvider stores author and changenote.

You may want to take a look at Wiki Variables [#1], though. They are
treated as page attributes so they can be reached via
WikiPage#getAttribute( String ); they're stored as WikiPage attributes as
part of the wiki markup parsing. Cfr with TableOfContentsTest (line 89) and
SpamFilter, lines 808-809

Would it be a useful addition to the RecentChangesPlugin to add optional
includes/excludes parameters so they check for the presence/absence of a
comma-separated list of Variables before generating the output? Not as a
security feature, but just for the use case you're describing (if so, then
patches would be wellcome O:-D)

juan pablo

[#1]: http://www.jspwiki.org/wiki/WikiVariables

On Wed, Apr 24, 2013 at 10:17 AM, Jürgen Weber <juergen@jwi.de> wrote:

> I'd like to make it possible for pages to hide from RecentChangesPlugin.
> Some authors prefer having their changes not appear on the front page.
> It should be easy to modify RecentChangesPlugin to exclude some pages. But
> how to decide if a page should be excluded?
> Currently, the only attribute a user can add is a Change Note (is that
> right?). So I could define a special "EXCLUDE_FROM_RECENT_CHANGES" Change
> Note that RecentChangesPlugin would use.
> Are there better ways?
> Have a dummy plugin [{de.mypackage.RecentChangesExcludePlugin}]
> that could be included in a page to signal to the RecentChangesPlugin ?
> (how does one find out if a plugin is used in a page?)
> Have a dummy ACL?
> What do you think?
> Thx, Juergen

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