adding attributes to a wiki page

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

adding attributes to a wiki page

Duke Tantiprasut

Is it possible to add other attributes / properties to a "wiki page"?

For example when you edit a page, you currently get the page content,
parent, default language and creator properties. Can you add additional
properties such as keywords / tags which may be referenced by scripts?

Thanks.

Duke




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: adding attributes to a wiki page

Stéphane Laurière
Hello Duke,

We're using tags on this the Mandriva Club XWiki, you can refer to
following pages for seeing the scripts used:
http://club.mandriva.com/xwiki/bin/KB/Tags?xpage=code
http://club.mandriva.com/xwiki/bin/KB/Menu?xpage=code
http://club.mandriva.com/xwiki/bin/view/KB/TagSheet?xpage=code
http://club.mandriva.com/xwiki/bin/view/KB/TagTemplate?xpage=code

+ we have two XWiki classes:
* KB.Tag, with two String fields: name, description
* KB.Tags, with one DBList field containing following Hibernate Query:

select distinct prop.value from BaseObject as obj, StringProperty as
prop, XWikiDocument as document where obj.className='KB.Tag' and
prop.id.id = obj.id and obj.name=document.fullName and
prop.id.name='name' and document.name <> 'TagTemplate' order by prop.value

For selecting pages tagged with several tags, I think following query
would be a start:
#set ($sql = ", BaseObject as obj, DBStringListProperty as prop,
DBStringListProperty prop1 join prop.list list join prop1.list list1
where obj.name=doc.fullName and obj.className='Edos.Tags' and
obj.id=prop.id.id and prop.id.name='list' and list='tag1' and
obj.id=prop1.id.id and prop1.id.name='list' and list1='tag2' order by
doc.name")

XWiki.com deals with tags too, see
http://www.xwiki.org/xwiki/bin/view/XWiki/TagScript.

Cheers!

Stéphane



Duke Tantiprasut wrote:

> Is it possible to add other attributes / properties to a "wiki page"?
>
>
> For example when you edit a page, you currently get the page content,
>  parent, default language and creator properties. Can you add
> additional properties such as keywords / tags which may be referenced
> by scripts?
>
> Thanks.
>
> Duke
>
>
>
>
> ------------------------------------------------------------------------
>
>
>
> -- You receive this message as a subscriber of the
> [hidden email] mailing list. To unsubscribe:
> mailto:[hidden email] For general help:
> mailto:[hidden email]?subject=help ObjectWeb mailing lists
> service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: adding attributes to a wiki page

Duke Tantiprasut
Thanks Stephane, exactly what I'm after!

Duke

> -----Original Message-----
> From: Stéphane Laurière [mailto:[hidden email]]
> Sent: Wednesday, January 04, 2006 7:26 AM
> To: [hidden email]
> Subject: Re: [xwiki-users] adding attributes to a wiki page
>
> Hello Duke,
>
> We're using tags on this the Mandriva Club XWiki, you can
> refer to following pages for seeing the scripts used:
> http://club.mandriva.com/xwiki/bin/KB/Tags?xpage=code
> http://club.mandriva.com/xwiki/bin/KB/Menu?xpage=code
> http://club.mandriva.com/xwiki/bin/view/KB/TagSheet?xpage=code
> http://club.mandriva.com/xwiki/bin/view/KB/TagTemplate?xpage=code
>
> + we have two XWiki classes:
> * KB.Tag, with two String fields: name, description
> * KB.Tags, with one DBList field containing following Hibernate Query:
>
> select distinct prop.value from BaseObject as obj,
> StringProperty as prop, XWikiDocument as document where
> obj.className='KB.Tag' and prop.id.id = obj.id and
> obj.name=document.fullName and prop.id.name='name' and
> document.name <> 'TagTemplate' order by prop.value
>
> For selecting pages tagged with several tags, I think
> following query would be a start:
> #set ($sql = ", BaseObject as obj, DBStringListProperty as
> prop, DBStringListProperty prop1 join prop.list list join
> prop1.list list1 where obj.name=doc.fullName and
> obj.className='Edos.Tags' and obj.id=prop.id.id and
> prop.id.name='list' and list='tag1' and obj.id=prop1.id.id
> and prop1.id.name='list' and list1='tag2' order by
> doc.name")
>
> XWiki.com deals with tags too, see
> http://www.xwiki.org/xwiki/bin/view/XWiki/TagScript.
>
> Cheers!
>
> Stéphane
>
>
>
> Duke Tantiprasut wrote:
> > Is it possible to add other attributes / properties to a
> "wiki page"?
> >
> >
> > For example when you edit a page, you currently get the
> page content,  
> > parent, default language and creator properties. Can you add
> > additional properties such as keywords / tags which may be
> referenced
> > by scripts?
> >
> > Thanks.
> >
> > Duke
> >
> >
> >
> >
> >
> ----------------------------------------------------------------------
> > --
> >
> >
> >
> > -- You receive this message as a subscriber of the
> > [hidden email] mailing list. To unsubscribe:
> > mailto:[hidden email] For general help:
> > mailto:[hidden email]?subject=help ObjectWeb mailing lists
> > service home page: http://www.objectweb.org/wws
>
>
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws