[SOLVED] Convert Plugin URL to SEO URL

Hey guys,

How can I convert an Plugin URL to an SEO friendly URL?

This:
albumlist.html?–flickr_photogallery-albumlist%5B%40package%5D=flickr.photogallery&–flickr_photogallery-albumlist%5B%40controller%5D=flickr&–flickr_photogallery-albumlist%5B%40action%5D=photosinline&–flickr_photogallery-albumlist%5B%40format%5D=html&–flickr_photogallery-albumlist%5BalbumId%5D=72157683441489642

should be:
albumlist/photos/72157683441489642

I’ve tried this but it does not work.

Hi, can you give an example Routes.yaml you tried?

if you are using NeosDemo Package i think it should be something like this:

## Add this part at top in Neos Configuration/Settings.yaml
#-
#  name: 'Neos.Demo'
#  uriPattern: '<ProductSubroutes>'
#  subRoutes:
#    'ProductSubroutes':
#      package: 'Neos.Demo'

## Add this part at your plugin Configuration/Settings.yaml
-
  name: 'Show Route'
  uriPattern: '{node}/photos/{--flickr_photogallery-albumlist.albumId}'
  defaults:
    '@package': 'TYPO3.Neos'
    '@controller': 'Frontend\Node'
    '@format': 'html'
    '@action': 'show'
    '--flickr_photogallery-albumlist':
      '@package': 'Neos.Demo'
      '@controller': 'Flickr'
      '@action': 'tagStream'
      '@format': 'html'

Thank you Christian!

This is my Plugins Routes.yaml, but it does not work

-
name: 'Photos Route'
uriPattern: '{node}/photos/{--flickr_photogallery-albumlist.albumId}'
defaults:
  '@package': 'Flickr.Photogallery'
  '@controller': 'Frontend\Node'
  '@format': 'html'
  '@action': 'show'
  '--flickr_photogallery-albumlist':
    '@package': 'Flickr.Photogallery'
    '@controller': 'Flickr'
    '@action': 'albumList'
    '@format': 'html'

As i can see on git package:

albumList does not get arguments like albumId.

Maybe you should change the action to the photos or photosInline action.


-
name: 'Photos Route'
uriPattern: '{node}/photos/{--flickr_photogallery-albumlist.albumId}'
defaults:
  '@package': 'Flickr.Photogallery'
  '@controller': 'Frontend\Node'
  '@format': 'html'
  '@action': 'show'
  '--flickr_photogallery-albumlist':
    '@package': 'Flickr.Photogallery'
    '@controller': 'Flickr'
    '@action': 'photos'
    '@format': 'html'

I have changed, but it does not work :frowning:

Seems so like this is because you dont use/need a model or repository but a plugin with Flickr connection. so this is not a normal case. you have to try out a little bit …

maybe you have to asign the actual albumId in the controller photoAction … or something like this

Thank you Christian!

I’ve find a solution:

-
name: 'Photos Route'
uriPattern: '{node}/photos/{--flickr_photogallery-albumlist.albumId}'
defaults:
  '@package': 'Neos.Neos'
  '@controller': 'Frontend\Node'
  '@format': 'html'
  '@action': 'show'
  '--flickr_photogallery-albumlist':
    '@package': 'Flickr.Photogallery'
    '@controller': 'Flickr'
    '@action': 'photosInline'
    '@format': 'html'
routeParts:
  node:
    handler: Neos\Neos\Routing\FrontendNodeRoutePartHandler
appendExceedingArguments: 'true'
1 Like

Great Job!