Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
is possible add aliases for media?
I mean custom url for galleries with my prefix.
Thank you
Comments
Comment #2
landsman CreditAttribution: landsman as a volunteer and commentedI was found this Sandbox which can be useful for this.
Comment #3
BerdirThat's Drupal 7, are you asking about Drupal 7 or 8?
Drupal 8 should work out of the box, you might just need to enable the entity type in the settings.
Comment #4
Tomazetti CreditAttribution: Tomazetti commentedI am using Pathauto pattern
/[media:bundle]/[media:name]
for media.Some of my media types have names composed of more than one word, for example Image Gallery or Local Video.
I'm having two problems:
1 - When I use Bulk Generate to generate media aliases, Image aliases are created correctly, but the Image Gallery and Local Videos type aliases are created incorrectly.
ex.:
/image gallery/image-gallery
/local videos/local-videos
If I use Bulk Generate with the option Update the URL alias for paths having an old URL alias the incorrect aliases are fixed.
ex.:
/image-gallery/gallery-name
/local-videos/video-name
2 - Media aliases are not generated automatically, only through bulk generate.
Comment #5
Tomazetti CreditAttribution: Tomazetti commentedComment #6
Tomazetti CreditAttribution: Tomazetti commentedMy two problems were caused by changes I made with a hook_path_insert.
Sorry for the delay in following this issue.
The module is working as @Berdir said it should.