I have just started building a drupal 7 site and have installed the media gallery module to it. I have the gallery set up and set to show media on a full page and have two problems I can't work out.

1. How do you change the alias / URL of the individual image pages so it can be more SEO, is there an option or does it need to be changed in the code?
2. How do I add an ALT tag to the images on the full page

Thanks

Comments

versvs’s picture

Hi redhare,

I'm having the same issue. Not for SEO reasons, but I would like to have beautiful URL on each individual image. Did you manage to change that? How can it be made?

Thanks!

Moloc’s picture

I don't see any option in media_gallery to do that, but in general (as a workaround) you can create aliases using /admin/config/search/path.

Moloc’s picture

Title: Show media on a full page URL » Set URL for media on detail page
Version: 7.x-1.0-beta4 » 7.x-1.0-beta7
Category: support » feature

duplicate:
#1391558: Set URL for media on detail page.
#1463542: is there any way to assign Clean URLs to the individual media pages?

Change this to a feature request, to make URL-Aliases of /media-gallery/detail/%/% to some custom path (for example /gallery/image/[token]).

Note: Setting an alias for the URL /media-gallery/detail/%/% will break the colorbox-view, as the javascript is not able to replace the word detail to lightbox in the url.

jeramy’s picture

There seems to be a decent answer on StackExchange:
http://drupal.stackexchange.com/questions/18574/path-configuration-in-me...

The answer is a bit over my head so I have been unable to implement it myself, but I link it here in hopes that maybe it will help someone else create a patch.

juliangb’s picture

For info on this issue, I have created a small module for my own use that integrates media gallery with pathauto.

I have it working on my own site at the moment (see http://julian.granger-bevan.me/galleries/london), and will upload to drupal.org when I've made it a little more robust.

juliangb’s picture

I've uploaded the module to http://drupal.org/sandbox/juliangb/1785610 .

Please do try it out for your needs, and make an issue if we can make it better.

At the moment it works but is quite basic (and there might be better ways of doing things).

Hetta’s picture

On D7.22 with media_gallery 7.x-2.x-dev, media 7.x-2.0-unstable7+38-dev, and pathauto 7.x-1.2+12-dev, I get the following error messages:

        Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of /srv/www/htdocs/modules/system/system.admin.inc).
    Warning: uasort(): Array was modified by the user comparison function in system_modules() (line 800 of /srv/www/htdocs/modules/system/system.admin.inc).
    Notice: Undefined index: name in _system_modules_build_row() (line 982 of /srv/www/htdocs/modules/system/system.admin.inc).

as well as this:

Other
				
Enabled	Name	Version	Description	Operations
Incompatible with this version of Drupal core.			
This version is not compatible with Drupal 7.x and should be replaced.

in the modules list.

juliangb’s picture

@Hetta, was that on the sandbox module I linked to?

Hetta’s picture

Yes, that was the sandbox one in #6.

Hetta’s picture

Nevermind, media_gallery doesn't display "nice" URLs even if they're entered manually ... I'll be filing that as another bug.

Mooff’s picture

The Sandbox version above unfortunately doesn't work with media 7.2 anymore.

It takes the pattern in file paths instead of the one in media gallery item paths and adds a redirect for that one.

Does anyone have a quick fix for that behaviour?

peterpan1972’s picture

Issue summary: View changes

@juliangb,

Hello, you can have your module Media Gallery Pathauto?

ivnish’s picture

Status: Active » Closed (outdated)