Feature #2738
Routing: Configurable appendix for "formatless" URIs
Status: | Closed | Start date: | 2009-03-02 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 0% |
|
Category: | MVC | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: |
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.
History
#1 Updated by Bastian Waidelich over 6 years ago
- Assigned To set to Bastian Waidelich
That should be configured globally and/or per Route. S.th. like:
MyRoute: uriPattern: {foo} options: appendMissingSlash
#2 Updated by Robert Lemke about 6 years ago
- Target version changed from 1.0 alpha 1 to 283
#3 Updated by Robert Lemke about 6 years ago
- Target version deleted (
283)
#4 Updated by Bastian Waidelich about 5 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.
#5 Updated by Karsten Dambekalns almost 5 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
.
#6 Updated by Bastian Waidelich almost 5 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?
#7 Updated by Karsten Dambekalns almost 5 years ago
- Status changed from Needs Feedback to Closed
Yeah, it does that. Cool. :)