Support

Support is part of Event Gallery Extended.

Please get a subscription if you need support. Feel free to use the ticket system or the contact form for reporting defects or pre-sale questions. Make sure you're logged in in order to be able to create a new ticket.

For general information you can also jump to the manual.

Subscribe now!

#4098 Headers for "singleimage"

Posted in ‘Event Gallery Extended’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by sbluege on Sunday, 08 August 2021 16:03 UTC

marek.sarvas

Hi

If a "single image" section is displayed on the page, the page header displays the name of the event. Can you help me? I would like the name of the image to be displayed as the H1 header. The name "event" may be displayed instead of the image name.

I simply want to exchange the event name and the image name in the "singleimage" section.

Google misinterprets and does not respond to the name of the image, this negatively affects SEO and image search on Google.

There can be 100 images in different names in one "event", but Google always identifies only the name "event" and not the actual name of the image.


https://www.images-sales.com/flora/flowers/singleimage/flowers/flow-2-jpg/


Thank You
Marek Sarvas

 

Attachments

Screenshot_20210804_150919.png

marek.sarvas

SORRY BAD SCREENSHOT!

Here is correct image....

Attachments

eg.png

sbluege

Hi Marek, 

currently, a single function composes this output. To change this, you would need to modify the template. Are you familiar with template overrides? The $file-object contains a couple of methods to retrieve what you want to display, and you can wrap them into the desired HTML-tags.  

marek.sarvas

Hi

There are definitely several solutions, but I can't do it quickly and rationally. I thought you'd advise me. Maybe it would be enough to make a poppy adjustment in the code for "singleimage" but I don't know where.

This would definitely help more, because "sigleimage" presents a specific image and not an event.

Thx
Marek

marek.sarvas

Screenshot...

Attachments

ev.png
eg.png

marek.sarvas

For example ... Someone will look for chili peppers and not plants images. It would be unbearable for 5 pictures to start a new event.

sbluege

To simplify the template override (and to reduce possible errors in future versions with template overrides), I refactored the template structure and added some methods for you to retrieve data. You need to download the latest build from there: 

Download (svenbluege.de) => https://www.svenbluege.de/joomla-event-gallery/eventgallery-download/event-gallery-bleeding/eventgallery-3-12-9/pkg_eventgallery_full_3_12_9_20210808074843_d2128945-zip?format=zip

Then you have a new file components\com_eventgallery\views\singleimage\tmpl\default_image_description.php

This code will output the necessary data, please wrap it with the HTML-tags you need: 

<?php

echo $file->getFileTitle();
echo $file->getFileCaption();
echo $file->getFileName();
echo $file->getExifAsString();

?>

For a start, you can directly modify the default_image_description.php file. If it works for you, I recommend creating a template override. This will avoid losing the changes with every Event Gallery update.

Please consider testing on a copy of your site to avoid any issues with your production site.

marek.sarvas

Solved, thank you very much
Marek

sbluege

Very nice! I'll include this change in the next release. Make sure you're using a template override to avoid losing your changes.

marek.sarvas

Template overwite not working, I still have no idea why. Joomla version? I don't know, but I'll figure it out

sbluege

What is the path and filename of your override?

marek.sarvas

TEMPLATE/html/com_eventgallery/views/singleimage/tmpl/default_image_description.php

sbluege

Try TEMPLATE\html\com_eventgallery\singleimage\default_image_description.php

the /tmpl is not necessary in the path.

marek.sarvas

html/com_eventgallery/views/singleimage/tmpl

marek.sarvas

It's already cashing, I'll solve it later

sbluege

The file needs to have exactly this path: TEMPLATE\html\com_eventgallery\singleimage\default_image_description.php I tried it a second ago. You can also use the Joomla template Manager to create the override files. It will create too many files, so delete what you don't need.