incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Paige" <bobpa...@gmail.com>
Subject Re: Page types
Date Sat, 05 Jul 2008 12:37:48 GMT
I just did a little experiment regarding metadata and I am really liking the
CSS approach.

Suppose you add something like this to your page:
%%collapsebox
!Metadata
|tag|Whitepaper
|tag|Event
%%

This defines two pieces of metadata. In this example they are both of type
'tag', but with different values. Metadata could have any name (and any
number of columns!) but this illustrates how you could have multiple tags
with the same name if you needed it.

Notice that I used the 'collapsebox' CSS tag. This is part of the
TableOfContents plugin, so it is already available. You need to provide a
header (the "!Metadata" line) for the collapsebox to hook into.

This gives us:
1. arbitrary structure over the metadata
2. metadata is easily editable
3. metadata is easily viewable/hideable
4. metadata is easily searchable (the standard search mechanism will find
"tag|Whitepaper" in my example above

One step further:
Coupled with SearchPlugin you *almost* have a replacement for Categories or
even TagPlugin. Once I had sample metadata as described above I tried using
SearchPlugin to find only pages with certain tags (i.e. "[{Search
query='Type|Whitepaper'}]"). While this works, there are a few downsides:
1. the output always contains the current page (since it satisfies the query
as well)
2. the output is displayed in a search table with rankings
3. accidental hits are possible if your criteria are not sufficiently
specific.

The second point is interesting. My sample wiki has < 100 pages. Added some
metadata to 5 pages and setup another page with the SearchPlugin. Even
though these were the *only* pages with those tags, some were given a score
as low as 19 and others as high as (only) 57. The score seems to be based on
how large the page is. If the page contained only the metadata and one other
link, the score was 57. If the page contained about a dozen lines with the
metadata at the end, the score was 19.

-- 
Bobman

On Sat, Jul 5, 2008 at 7:46 AM, Bob Paige <bobpaige@gmail.com> wrote:

> Christophe,
>
> What if you wrote a page filter that included the semantic content? Tying
> this back to the Alias/Macro discussion, the content to be inserted could be
> in other wiki pages named after the different type, i.e. WhitePaper-Header,
> WhitePaper-Footer, Event-Header, Event-Footer, etc.
>
> The catch would be to identify what 'type' of page is being processed.
>
> The simplest solution is to base in on the page name. For example,
> whitepapers could always have a suffix of 'WhitePaper', i.e. 'Agricultural
> WhitePaper'.
>
> A more complicated solution would be to add arbitrary meta-data to the page
> and have the filter choose based on this meta-data. I see some discussion of
> metadata here (http://www.jspwiki.org/wiki/IdeasMetadata). Personally, I
> think the CSS approach makes the most sense.
>
> --
> Bobman
>
>
>
> On Sat, Jul 5, 2008 at 4:42 AM, Dirk Frederickx <dirk.frederickx@gmail.com>
> wrote:
>
>> Did you check the http://www.jspwiki.org/wiki/IfPlugin  which should
>> give you quite some power too.
>> You could eg consder to add this to [TitleBox] page or
>> [CopyrightNotice] pages, which allows to do this kind of stuff without
>> touching the template.jsp pages.
>>
>>
>> dirk
>>
>>
>>
>> On Fri, Jul 4, 2008 at 3:32 PM, Christophe Dupriez
>> <christophe.dupriez@poisoncentre.be> wrote:
>> > Hi !
>> >
>> > I would like to follow-up the "aliases" discussions by one on the "page
>> types".
>> >
>> > The idea is that "constant" plugin calls would be very useful for a
>> given type of pages in a Wiki.
>> >
>> > Examples: In a Wiki with "events", "white papers", "definitions", one
>> would like:
>> >
>> > Page about an Event: list at the bottom of the pages referring to this
>> event
>> >
>> > Page with a White Paper: Always a TableOfContent at the top;
>> >  + list at the bottom of the pages referring to this White Paper
>> > about an Event: list at the bottom of the page of the pages referring to
>> this event
>> >
>> > Page with a definition:
>> >   At the top: links to broader terms; links to narrower terms
>> >   At the bottom: list at the bottom of the pages referring to this
>> definition
>> >
>> > For now, I am thinking of a <c:choose>, <c:when>, and <c:otherwise>
in
>> PageTop/PageBottom.JSP
>> > (one c:when per page type)
>> >
>> > Any better idea ???
>> >
>> > Christophe
>> >
>> > P.S. To come nearer from a Semantic Wiki, page type is somewhat a must.
>>
>
>

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