Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS

How to use this UrlSegment-Transformation with another Field than Title


Reply

2 Posts   625 Views

Avatar
Lukin

24 March 2011 at 8:21am Community Member, 42 Posts

HI,

I want another field than Title to be taken as reference for the URLSegmet.

My Field is called Typ which is a dropDown Field.

The selected value has to become the URLSegment.

If I put the selected value into URLSegemet on BeforeWrite it doesn't make the transformation (ü->ue, '->-,etc)

How can I fix this?

Thanks in advance

Salut
Lukin

Avatar
Carbon Crayon

31 March 2011 at 12:11am Community Member, 598 Posts

Hi Lukin,

You can use:

SiteTree::generateURLSegment($this->YourField);

Hope that helps,

Aram

www.ssbits.com - Your one stop SilverStripe learning resource.