[xwiki-users] Registration page code
Hello! On the user management page ( http://platform.xwiki.org/xwiki/bin/view/AdminGuide/User+Management) there is this info: "You can also customize the way users are registered in your xwiki by creating a XWiki.Registration page which will override the default registration page." All I would like to do was to add a little warning, so I'd like to just copy the current page code and add it.... but if I ask to view the XWiki.Registration or XWiki.Register page codes, they are empty. Where can I find the code for the current Register process? Thank you, -- Tiago Rinck Caveden http://caveden.multiply.com
Hi, It is a velocity template in the the template folder. You can access it here : http://<yourserver>/xwiki/templates/registerinline.vm You can copy its content, and paste it in XWiki.Registration, but beware and make sure you remove the initial test : #if(!$xwiki.hasAccessLevel("view","XWiki.Registration")||$xwiki.getDocument("XWiki.Registration").isNew()) [...] ## here is the code you want to keep #else $xwiki.getDocument("XWiki.Registration").getTranslatedDocument().getRenderedContent() #end Or your registration page will loop forever. Regards, Jerome. Tiago Rinck Caveden wrote:
Hello!
On the user management page ( http://platform.xwiki.org/xwiki/bin/view/AdminGuide/User+Management) there is this info: "You can also customize the way users are registered in your xwiki by creating a XWiki.Registration page which will override the default registration page."
All I would like to do was to add a little warning, so I'd like to just copy the current page code and add it.... but if I ask to view the XWiki.Registration or XWiki.Register page codes, they are empty. Where can I find the code for the current Register process?
Thank you,
Added here: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/User+Management#HCustomi... Thanks -Vincent PS: I keep thinking that we should never answer a user's question directly but instead fix the doc and only reply by giving links :) That way we'll automatically improve our documentation. That said it's better to answer that not to answer of course :) I'm just aiming for the next level... On Sep 12, 2008, at 2:56 PM, Jerome Velociter wrote:
Hi,
It is a velocity template in the the template folder. You can access it here : http://<yourserver>/xwiki/templates/registerinline.vm You can copy its content, and paste it in XWiki.Registration, but beware and make sure you remove the initial test :
#if(!$xwiki.hasAccessLevel("view","XWiki.Registration")|| $xwiki.getDocument("XWiki.Registration").isNew())
[...] ## here is the code you want to keep
#else
$ xwiki .getDocument ("XWiki.Registration").getTranslatedDocument().getRenderedContent() #end
Or your registration page will loop forever.
Regards, Jerome.
Tiago Rinck Caveden wrote:
Hello!
On the user management page ( http://platform.xwiki.org/xwiki/bin/view/AdminGuide/User +Management) there is this info: "You can also customize the way users are registered in your xwiki by creating a XWiki.Registration page which will override the default registration page."
All I would like to do was to add a little warning, so I'd like to just copy the current page code and add it.... but if I ask to view the XWiki.Registration or XWiki.Register page codes, they are empty. Where can I find the code for the current Register process?
Thank you,
participants (3)
-
Jerome Velociter -
Tiago Rinck Caveden -
Vincent Massol