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

Is it possible to provide custom error template #626

Open
mmart1n opened this issue Jan 6, 2025 · 3 comments
Open

Is it possible to provide custom error template #626

mmart1n opened this issue Jan 6, 2025 · 3 comments

Comments

@mmart1n
Copy link

mmart1n commented Jan 6, 2025

Hello, if a wrong url to image is provided the gallery displays div with class g-image-error-message. Is it possible to provide custom template for it?

@MurhafSousli
Copy link
Owner

You can provide a custom template but this means you need to handle the display of the images as well

@mmart1n
Copy link
Author

mmart1n commented Jan 7, 2025

Currently in version 8.0.4 when autoHeight is set to true and max-height is set, when an image fails to load the original error template is rendered with height of 16px, no matter that the GalleryItemComponent has min-height of 300px for example.
This seems to do the trick, but in case you have any other suggestions I'm glad to hear.

ps. If all of the images can't be loaded the height of the .g-box is 0 and the fallback is not visible at all.
image

@MurhafSousli
Copy link
Owner

MurhafSousli commented Jan 13, 2025

It's kinda difficult for me to go back to an older version, I don't remember what was possible at that version and whether it was fixed in a newer version. it's a small project you know. I can only deal and investigate with the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants