[xwiki-devs] Editing Notice messages

Sergiu Dumitriu sergiu at xwiki.com
Sat Mar 26 02:20:27 UTC 2011


On 03/26/2011 03:05 AM, John Lantz wrote:
> I'd like to edit the text/page generated by the default Notice message and turn it into a more user friendly 404-styled page.
>
> e.g.
> ---
> Notice
> The requested document could not be found.
> You can edit this page to create it.
> ---
>
> How do I go about doing that? Where is the message text located?

The message is in two places:

- webapp/xwiki/templates/docdoesnotexist.vm is the velocity template 
that generates the page as a whole
- in the translation file is the exact text; the file is packed inside 
webapp/xwiki/WEB-INF/lib/xwiki-core-X.Y.jar#ApplicationResources*.properties

If you look inside the template, you'll notice that it already allows to 
easily override the message. All you have to do is create 
XWiki.DocumentDoesNotExist and put your content in there.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/



More information about the devs mailing list