[Contao 3] Teaser image gets ignored in the calendar module #4918

Open
ben-eSM opened this Issue Oct 10, 2012 · 7 comments

Projects

None yet

4 participants

@ben-eSM
ben-eSM commented Oct 10, 2012

Although it is possible to define a teaser image in an event entry, which is useful, the teaser images are ignored in every available eventlist template. And none of the templates has a teaser image part anymore. I don't know if this is intended, which doesn't make sense though.

It should be possible to use teaser images with at least one of the event list templates.

@ben-eSM
ben-eSM commented Oct 10, 2012

Just realised that the addImage part in the module is the old one from Contao 2.

@leofeyer
Member

AFAIK, the teaser image feature was requested by someone, so we added it. The default calendar templates do not use it though. Or did you find a Contao 2 template which does?

@ben-eSM
ben-eSM commented Oct 11, 2012

Actually it was the first time I used it, so I came across the code. But I think it would be a good idea to implement it in Contao 3 again and even offer one template using the teaser image.
For instance, if you simply wanna present exhibition dates on your site, you usually won't need any content element at all. Usually you just present the date and the name of the exhibition. But adding the exhibition logo as teaser image would be a big plus, I think.

@brandbrilliance
Contributor

you can just snatch the image code from the event_xxxx templates.

@ben-eSM
ben-eSM commented Oct 16, 2012

It's not mainly about the image_container in the templates. I could snatch those from the news templates instead. But the image processing routine in the module needs to be modified to use the new Contao 3 image handling. Or else you'll only get the image ID instead of a path in the template.
But since it's only about rewriting a few lines in the module, I vote for reimplementing the feature in Contao 3.

@brandbrilliance
Contributor

I second this feature. Contao\Events\addEvent() should add the singleSRC and image to the template using the size parameters, which should be a new size field in the ModuleCalendar, just like in EventList or NewsList. The display of an image in a large calendar view will be invaluable as a visual guide.

Also, the template must still be able to access the image code regardless e.g. at least access to the singleSRC converted into a folder path, like it's got for news.

Perhaps also a checkbox to hide images, just for the non-coders who don't want to play too much with the template, e.g. if ($this->addImage && $this->showImage) {}

@magicsepp

adding the image code to an event_teaser template works as long as the fullsize lightbox isn't checked. By having fullsize set controller.php:3006 exchanges the href links and destroyes the links to reader.

@leofeyer leofeyer modified the milestone: 3.x.x Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment