[xwiki-devs] Editing Notice messages

John Lantz JohnL at ideablade.com
Mon Mar 28 21:41:17 UTC 2011


Thank you Sergiu!

This was a huge help.

Thanks again,

John

-----Original Message-----
From: devs-bounces at xwiki.org [mailto:devs-bounces at xwiki.org] On Behalf Of Sergiu Dumitriu
Sent: Friday, March 25, 2011 7:20 PM
To: XWiki Developers
Subject: Re: [xwiki-devs] Editing Notice messages

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/
_______________________________________________
devs mailing list
devs at xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs




More information about the devs mailing list