[opencms-dev] UrlMapping with category

Enrico Marongiu enrico.marongiu at gmail.com
Wed Jul 15 15:16:38 CEST 2015


Hi all,
we are trying to map the urlName with a urlNameField and setting it with
the default:

<default element="UrlNameField"
value="%(value:Category[1].name)%(no_prefix:: )%(value:Title[1])"
resolveMacros="false" />

Category is mapped to OpenCmsCategory

two questions:
1) urlName is working, but it yields an url like
www.example.com/.sites-mysite-.categories-mycategory--mytitle. What I want
is just www.example.com/mycategory-mytitle
2) if I set more than one category, how can I take just the first one?


TIA,
Enrico


-- 

[image: Enrico Marongiu on about.me]

Enrico Marongiu
about.me/cernio
skype: cerionmorgauin
  <http://about.me/cernio>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150715/bed8639e/attachment.htm>


More information about the opencms-dev mailing list