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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Editing the meta-data URL


Go to End


2 Posts   1471 Views

Avatar
MarioSommereder

Community Member, 107 Posts

18 January 2010 at 11:19pm

Hi,

is there a way to edit the meta-data URL? I want something like my-site/news/2009/article-title/ because in one of our current projects the news title often is similar to a products page title and I'm afraid, the client won't pay so much attention to this issue then we do.

Thanks for any help in advance.

Cheers, Mario

Avatar
MateuszU

Community Member, 89 Posts

19 January 2010 at 9:05am

If you are using 2.3.4, then the url structure will be flat, ie there is no nesting of urls. First segment always links to a page and the next segments are parsed as parameters to the request.

With 2.3.4 you would need to create the custom pagetype (NewsProviderPage, or whatever you call it) and configure routing so 2009 and article-title are used to display the article. You need to implement the logic yourself though, and everything would need to happen within the NewsProviderPage.

Other solution is 2.4 upgrade and enabling nested urls. Then you would create the holder named 'news', then under that a holder named 2009, and then under that you would put articles. Caveat: nested urls and 2.4 are not stable version, although we are using them for several projects and they seem pretty usable. Might be worth a try in your case.