- changed title to Human readable URL in Typo3 9.x
Human readable URL in Typo3 9.x
Since realurl is not used anymore in Typo3 9.x ad 10.x, the URL “used” to display the albums and galleries are not “human readable” anymore.
Ie. for the same album
Typo3 8:
https://ceff.vector.ch/artisanat/galeries-photos/album/ceremonie-de-cloture-5-juillet-2019/?tx_fsmediagallery_mediagallery%5Bcontroller%5D=MediaAlbum&cHash=a011df7470d844fb0826497d67d087c5
Typo3 9:
https://ceffv9.vector.ch/artisanat/galeries-photos?tx_fsmediagallery_mediagallery%5Bcontroller%5D=MediaAlbum&tx_fsmediagallery_mediagallery%5BmediaAlbum%5D=146&cHash=a011df7470d844fb0826497d67d087c5
So the mediaAlbum info rewriting (replacement by the album name) does not seem to be rendered anymore.
Is there a solution for that in Typo3 9 and higher?
Thanks a lot for your help.
Joel
PS: fs_media_gallery version used is 2.0.1 and not 1.4.8 as possibly selected in the Version dropdown.
Comments (3)
-
reporter -
reporter Solution find by adding the following to config.yaml.
Big thanks to Xavier Perseguers for the help.
(be careful, it’s a yaml file, so indentation should be handle with care…).
routeEnhancers:
MediaGallery:
type: Extbase
extension: FsMediaGallery
plugin: Mediagallery
routes:
- routePath: '/album/{album-title}/{page}'
_controller: 'MediaAlbum'
_arguments:
album-title: mediaAlbum
page: '@widget_assets/currentPage'
defaults:
page: '0'
aspects:
album-title:
type: PersistedAliasMapper
tableName: sys_file_collection
routeFieldName: slug
page:
type: StaticRangeMapper
start: '1'
end: '100'
-
repo owner - changed status to resolved
- Log in to comment