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.

Data Model Questions

[SOLVED] URL slug instead of ID on DataObject?


Reply

10 Posts   4248 Views

Avatar
LesC

10 December 2009 at 9:49pm Community Member, 70 Posts

Hi Potion Maker,

I should have marked this one as resolved - Martijn's solution worked perfectly.

I'm not sure how you would get it working with yours, but I'd try generating a string from the two components, then sticking them thru the generateURLSegment function.

Les

Avatar
Judge

6 March 2010 at 3:09am Community Member, 79 Posts

Nice. So SiteTree::generateURLSegment() is SilverStripe's slug generation equivalent.

-- Jason