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   651 Views

Avatar
Lukin

Community Member, 42 Posts

24 March 2011 at 8:21am

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

Community Member, 598 Posts

31 March 2011 at 12:11am

Hi Lukin,

You can use:

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

Hope that helps,

Aram

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