Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add individual link to gallery item #14797

Closed
strarsis opened this issue Apr 3, 2019 · 5 comments
Closed

Add individual link to gallery item #14797

strarsis opened this issue Apr 3, 2019 · 5 comments
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed

Comments

@strarsis
Copy link
Contributor

strarsis commented Apr 3, 2019

From time to time the need comes up to individually link a
gallery item to some specific page (and add a custom text below).

It is nice that now individual caption with individual link (inline) can be added.
But when all the other gallery items link to their media image (e.g. for a lightbox),
then also the gallery items that contain the individual link still link to the media image,
hence the user has to click/touch exactly on the individual caption,
otherwise the gallery item link to the media image file is selected.

@oandregal oandregal added the [Block] Gallery Affects the Gallery Block - used to display groups of images label Apr 3, 2019
@amielucha
Copy link

What you are looking for can be done using Gallery Custom Links plugin.

@strarsis
Copy link
Contributor Author

strarsis commented Apr 7, 2019

@amielucha: Updating a page with custom link by Gallery Custom Links plugin fails,
there seem to be compatibility issues with Gutenberg.
Ideally this should be integrated into Gutenberg gallery block.

@justintadlock
Copy link
Contributor

This feature would also make gallery images consistent with regular images, which allow you to enter a custom URL. The addition of this would definitely make galleries far more versatile.

I have a layout right now where I'm having to use the Columns block and manually enter individual Image blocks into the columns with custom URLs to get this behavior.

@dionysous
Copy link

dionysous commented Aug 26, 2019

Why the Custom URL setting is useful for the Gallery Block

The Gallery Custom Links plugin, @amielucha mentioned, adds two fields on the images in the Media Library (Link URL and Link Target). What if one and the same image is used in two different galleries? And you want to have two individual links in both Galleries on the same image? With this solution, it will break, therefore, in my opinion, the custom Link/URL values should be saved in the Gallery Block itself, which is cleaner and more elegant and doesn't lead to the described problem.

I find it very useful to have a Custom URL setting in the GalleryImage component. I can't let my customers use the core Gallery Block, because it lacks this feature compared to the core Image Block.

The Core Image Block already has a good implementation

Screencapture of Custom URL settings in the image block's controls

The Core Gallery Block & GalleryImage don't have the needed option

Screencapture of kink settings in the gallery block's controls

Why are the Image and GalleryImage settings so inconsistent?

@talldan
Copy link
Contributor

talldan commented Oct 8, 2019

This looks like a duplicate of #10057. Also see #11436 which seems to be proposing using the Image block as a nested block of the gallery, which would solve this issue.

@talldan talldan closed this as completed Oct 8, 2019
@talldan talldan added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed
Projects
None yet
Development

No branches or pull requests

6 participants