ZenphotoCMS Forum
Associate an image to a news or a page to display in list - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Associate an image to a news or a page to display in list (/thread-13426.html)



Associate an image to a news or a page to display in list - davidarnoult - 28-06-2020

Hello folks!

In Zenpage extension, I wish to associate one single image (thumbnail of existing album or photo) to one news or page in order to display in a list as card style (like here https://getbootstrap.com/docs/4.0/components/card/). I think about publishing the image in extra content field and using printNewsExtraContent(), it works but it is not very clean about cache and format control... Is there a smarter way (extending zenpage with an simple extension, configuration...)?

It seems that in the past there was a combinews feature (still documented in printNewsContent()) but now stopped. Would had it been helpful?

Thanks for any thought about it!




Associate an image to a news or a page to display in list - acrylian - 29-06-2020

The combinews feature was something different. It was meant to mix images and/or albums within news articles wihtin the next_news loop. Due to the difference of the separate item types it was a nightmare to maintain.

What you are looking for is this:
https://www.zenphoto.org/news/featured_image/




Associate an image to a news or a page to display in list - davidarnoult - 29-06-2020

Super cool for this extension, this is exactly what I am looking for! Thanks :-)




Associate an image to a news or a page to display in list - acrylian - 29-06-2020

And while it is already older and "archived" it should work as always. If there is indeed anything wrong let me know.




Associate an image to a news or a page to display in list - davidarnoult - 03-07-2020

It works perfecly, ajax back end image list window is a bit slow to select the feature image but in front end, it is fast and awesome.




Associate an image to a news or a page to display in list - acrylian - 03-07-2020

ajax back end image list window is a bit slow to select the feature image

I would assume you just encountered the usuage delay until the images are cached.