title: TYPO3 9.5 LTS routeEnhancers for news with uid to make path unique
body: <p>Hello I found the following on a TYPO3 Slack channel as what one person was using. This snip of <code>yaml</code> exists at the <code>/config/my-websitename/config.yaml</code>...</p>
  
  <pre><code>routeEnhancers:
    NewsList:
      type: Extbase
      limitToPages: [2,20,21,22,92]
      extension: News
      plugin: Pi1
      routes:
        - routePath: '/p{page}'
          _controller: 'News::list'
          _arguments: {'page': '@widget_0/currentPage'}
        - routePath: '/{news_title}'
          _controller: 'News::detail'
          _arguments: {'news_title': 'news'}
      defaultController: 'News::list'
      defaults:
        page: '0'
      requirements:
        page: '\d+'
        news_title: '^[a-zA-Z0-9].*$'
      aspects:
        page:
          type: StaticRangeMapper
          start: '1'
          end: '100'
        news_title:
          type: PersistedAliasMapper
          tableName: 'tx_news_domain_model_news'
          routeFieldName: 'path_segment'
  </code></pre>
  
  <h1>The problem</h1>
  
  <p>But I noticed that when I have multiple articles with the same title there's not a unique URL.</p>
  
  <h1>The question</h1>
  
  <p>How can I add the article <code>uid</code> to the path to make it unique or is that a good idea? I found that it was eluded to in the docs but don't know how to get it working to extend what I have already or if there's a better example someone can give me of how to get unique urls for news?</p>
  
  <p><a href="https://docs.typo3.org/typo3cms/extensions/core/latest/Changelog/9.5/Feature-86365-RoutingEnhancersAndAspects.html#persistedpatternmapper" rel="nofollow noreferrer">https://docs.typo3.org/typo3cms/extensions/core/latest/Changelog/9.5/Feature-86365-RoutingEnhancersAndAspects.html#persistedpatternmapper</a></p>