Feature #2738
Routing: Configurable appendix for "formatless" URIs
0%
Description
It should be possible to create "mycompany/about-us.html" as well as "mycompany/about-us/" or even "mycompany/about-us/index.html". That is, if no trailing slash or filename would be generated, something configurable should happen instead.
See realurl's "appendMissingSlash" for it's equivalent.
Updated by Bastian Waidelich almost 12 years ago
- Assignee set to Bastian Waidelich
That should be configured globally and/or per Route. S.th. like:
MyRoute: uriPattern: {foo} options: appendMissingSlash
Updated by Bastian Waidelich over 10 years ago
- Status changed from New to Closed
I'm closing this 1-year-old issue for now, cause I don't think we need this anymore with the current version.
E.g. if you wanted to add a suffix to all routes you could simply change:
- name: 'MyApplication' uriPattern: '<MyApplication>' subRoutes: MyApplication: package: MyApplication
to
- name: 'MyApplication' uriPattern: '<MyApplication>SUFFIX' subRoutes: MyApplication: package: MyApplication
Feel free to re-open this ticket if you don't agree.
Updated by Karsten Dambekalns over 10 years ago
- Status changed from Closed to Needs Feedback
Bastian Waidelich wrote:
I'm closing this 1-year-old issue for now, cause I don't think we need this anymore with the current version.
E.g. if you wanted to add a suffix to all routes you could simply change:
Well, that would then always append SUFFIX, no? So if a URL like foo.json
would be generated you' end up with foo.jsonSUFFIX
What this issue is about was that URLs with a format would get that appended, whereas URLs with no format would get the default, so that you never end up having simply foo
.
Updated by Bastian Waidelich over 10 years ago
Karsten Dambekalns wrote:
What this issue is about was that URLs with a format would get that appended,
whereas URLs with no format would get the default, so that you never end up having simplyfoo
.
Isn't that the setup in the current Phoenix demo?
http://latest.phoenix.demo.typo3.org/homepage/secondpage
works as well as
http://latest.phoenix.demo.typo3.org/homepage/secondpage.html
and
http://latest.phoenix.demo.typo3.org/homepage/secondpage.json
generated links will always append ".html" cause that's the default.
And if you'd wanted to force the format suffix, you could ommit the brackets in the uriPattern.
Or did I get it wrong?
Updated by Karsten Dambekalns over 10 years ago
- Status changed from Needs Feedback to Closed
Yeah, it does that. Cool. :)