Hi,

is possible add aliases for media?
I mean custom url for galleries with my prefix.

Thank you

Comments

landsman created an issue. See original summary.

landsman’s picture

I was found this Sandbox which can be useful for this.

Berdir’s picture

Category: Feature request » Support request
Status: Active » Postponed (maintainer needs more info)

That'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.

Tomazetti’s picture

I 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.

Tomazetti’s picture

Status: Postponed (maintainer needs more info) » Needs work
Tomazetti’s picture

Status: Needs work » Closed (works as designed)

My 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.