[xwiki-users] programming rights in class sheet

2012-02-04 Thread O Voss
Hi,

In documents based on a certain class I need to list the attachments of the 
document. I used the 'List attachments of a page'-snippet from 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples in the 
class sheet. This works perfectly fine as long as the document is saved by a 
user with programming rights. When saved by a normal user it doesn't work, as 
the priviledged API is used. Is there some workaround or solution for this?

Thanks

Olaf

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] redirecting to another page (search field)

2012-02-04 Thread Theresa Noisser

Hello,
i'm new to xwiki and tried to find an answer, but didn't succeed.
I would like to know how i can define a redirecting like it's common in 
Wikipedia. For example if you type in H2O it redirects you to the page 
water. In Wikipedia you create a page named H2O and the only content 
is #REDIRECT [[Water]].
I searched for this topic on the xwiki pages, but couldn't find the 
syntax for this. I'm sure it's a minor problem but i would be glad if 
someone could help.

Thanks in advance,
resi.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] default date: tody

2012-02-04 Thread O Voss
Hi,

I have a date field in a class that I want to default to the day of creation. I 
have set empty is today to 1 and thought that would do it. But it seems this 
set's the date to the creation date of the class rather than to that of new 
objects. 


Any advice appreciated!

Cheers,

Olaf

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] redirecting to another page (search field)

2012-02-04 Thread O Voss
Hi Theresa,

Not sure if it's the only or the most elegant solution (being a beginner 
myself), but what is desribed here should work: 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Redirect

Cheers,

Olaf



- Ursprüngliche Message -
 Von: Theresa Noisser theresa.nois...@web.de
 An: users@xwiki.org
 Cc: 
 Gesendet: 12:25 Samstag, 4.Februar 2012
 Betreff: [xwiki-users] redirecting to another page (search field)
 
 Hello,
 i'm new to xwiki and tried to find an answer, but didn't succeed.
 I would like to know how i can define a redirecting like it's common in 
 Wikipedia. For example if you type in H2O it redirects you to the 
 page water. In Wikipedia you create a page named H2O and 
 the only content is #REDIRECT [[Water]].
 I searched for this topic on the xwiki pages, but couldn't find the syntax 
 for this. I'm sure it's a minor problem but i would be glad if someone 
 could help.
 Thanks in advance,
 resi.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] programming rights in class sheet

2012-02-04 Thread Sergiu Dumitriu

On 02/04/2012 06:22 AM, O Voss wrote:

Hi,

In documents based on a certain class I need to list the attachments of the 
document. I used the 'List attachments of a page'-snippet from 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples in the 
class sheet. This works perfectly fine as long as the document is saved by a 
user with programming rights. When saved by a normal user it doesn't work, as 
the priviledged API is used. Is there some workaround or solution for this?


For that there's a simple API:

#foreach ($attachment in $doc.attachmentList)
* $attachment.filename
#end

--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] default date: tody

2012-02-04 Thread Sergiu Dumitriu

On 02/04/2012 06:40 AM, O Voss wrote:

Hi,

I have a date field in a class that I want to default to the day of creation. I 
have set empty is today to 1 and thought that would do it. But it seems this 
set's the date to the creation date of the class rather than to that of new 
objects.


Not quite, it's the date of the class template.

The problem is that you enabled empty is today before creating the 
document template. New documents are created by cloning the template 
first, and instead of cloning an empty date, you clone an existing date. 
I know it's not very user-friendly, this should be fixed in the future.


There's a workaround for this:

- delete the class template
- edit the class and uncheck empty is today
- create the template again
- edit the class and check back empty is today

See if it works fine this way.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users