Hi Vincent, yes the stripping would occure at the document creating time,
or when renaming the page.
The workarround for this would be to have the user always think that when
creating the new page, enter the name without accents and without spaces
and consequently change the page title to a desired name.
Other way is to go to the rename page action, and there carrefully change
the page name and not page title, this is little tricky.
The main reason for this is that the encoded urls looks ugly when sharing
it and copying directly to clipboard it out of the xwiki.
On 6 September 2016 at 09:22, Vincent Massol <vincent(a)massol.net> wrote:
Hi Miroslav,
On 06 Sep 2016, at 09:04, Miroslav Galajda
<miroslav.galajda(a)gmail.com>
wrote:
Hi, does anyone have idea, how to automatically modify/generate url from
page title so that the url doesn't contains accents or any special
characters. I want to achieve simmilar approach used in CMS system
Umbraco.
Which creates url based on page title but strips
spaces and any
characters
that requires url encoding.
I've found xwiki.urlfactory.serviceclass in xwiki.cfg. What is
responsibility of that class? What is it purpose? Can it be used to solve
my requirement?
XWiki supports lots of languages out of the box (you just need to
configure the encoding properly). Actually we’ve gone to great length to
ensure that any character is valid in page and space names! :)
May I ask why you would want to strip some characters?
Now you shouldn’t act at the level of the URLs since the URLs are just
used to find the corresponding document in XWiki. If you strip some char
from the URL then you won’t be able to point a URL to an existing document
anymore ;)
So what you really want is instead to act at the level of document
creation (the Add Page dialog box) and do the stripping there IMO.
However ATM we don’t provide any extension point for doing this so you’d
need to modify the corresponding vm file (create.vm I think, which calls
other vms) and do future merges of that file by hand whenever you upgrade
your XWiki instance in the future.
I recommend to reconsider going in that direction and instead letting
XWiki handle all chars.
Thanks
-Vincent
Thanks
Mirec
On 11 July 2016 at 21:58, Miroslav Galajda <miroslav.galajda(a)gmail.com>
wrote:
> Hi, I’m using XWiki in Slovak language which uses accents, which
> consequently causes problems with urls. The urls becomes ugly containing
> encoded characters with accents. Does XWiki have integration point out
of
the box
to replace the page name with custom one, with stripped accents
from it?
Thank you
Mirec
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users