Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] slug functionality is missing for v9 routing #268

Open
mgrundkoetter opened this issue Feb 28, 2019 · 1 comment
Open

[FEATURE] slug functionality is missing for v9 routing #268

mgrundkoetter opened this issue Feb 28, 2019 · 1 comment

Comments

@mgrundkoetter
Copy link

There need to be some slug fields in the db tables, the corresponding TCA an an example of a route config yaml in the docs. I'm working on a PR.

@mgrundkoetter
Copy link
Author

Routing with default values (for widget:paginate) does not work right not, see https://forge.typo3.org/issues/87436 and https://forge.typo3.org/issues/86895

So my current config does not work for that reason as well.

routeEnhancers:
  Forum:
    type: Extbase
    extension: Typo3Forum
    plugin: Pi1
    routes:
      -
        routePath: '/{forum_alias}/{page}'
        _controller: 'Forum::show'
        _arguments:
          forum_alias: forum
          page: '@widget_0/currentPage'
      -
        routePath: '/{forum_alias}/{topic_alias}/{page}'
        _controller: 'Topic::show'
        _arguments:
          topic_alias: topic
          forum_alias: forum
          page: '@widget_0/currentPage'
      -
        routePath: '/beitrag/{post_id}/melden'
        _controller: 'Report::newPostReport'
        _arguments:
          post_id: post
    defaultController: 'Forum::show'
    defaults:
      page: '1'
    requirements:
      page: '\d+'
      forum_alias: '^[a-Z0-9]+$'
      topic_alias: '^[a-Z0-9]+$'
      post_id: '\d+'
    aspects:
      forum_alias:
        type: PersistedAliasMapper
        tableName: tx_typo3forum_domain_model_forum_forum
        routeFieldName: slug
      topic_alias:
        type: PersistedAliasMapper
        tableName: tx_typo3forum_domain_model_forum_topic
        routeFieldName: slug
      page:
        type: StaticRangeMapper
        start: '1'
        end: '999'
      post_id:
        type: PersistedAliasMapper
        tableName: tx_typo3forum_domain_model_forum_post
        routeFieldName: uid

Also, for this very routing, all the calls to Topic::show(by f:link.action) need to be adjusted in the templates. The parameter forum: topic.forum needs to be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant