Skip to main content

Timeline for Multiple URL's for news entry?

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Mar 16, 2017 at 8:45 comment added carlcs Ahh… that <id> syntax wasn’t meant to be actual code, sorry. I thought there was a draggable ID token available in the UI. I never actually use that interface and setup my routes with the craft/config/routes.php file. Where I would use the following: 'news/(?P<id>\d+)' => 'news/_entry'.
Mar 16, 2017 at 8:37 vote accept Mark Olijslagers
Mar 16, 2017 at 8:36 comment added Mark Olijslagers Thanks carlcs! With the pattern 'news/<id>' added in cp --> routes, it gives a 404. When I add 'newsid/(?P<id>\d{3})' => 'news/_entry' it works fine for 3-digits id's. I'd like to accept all digits, but when removing \d{3} this route gives a 404 again.
Mar 16, 2017 at 0:48 history edited carlcs CC BY-SA 3.0
added 195 characters in body
Mar 16, 2017 at 0:38 history answered carlcs CC BY-SA 3.0