ZenphotoCMS Forum
Displaying most recent image in index.php - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Displaying most recent image in index.php (/thread-13142.html)



Displaying most recent image in index.php - demonsss - 2018-09-28

I'm trying to see if I can squeeze a photoblog format out of the current version.

Basically the behavior I am trying to get is that when you load the index page it displays the most recent image. When I tried using the printDefaultSizedImage(getImageTitle()) function it of course spit out an error.

I tried using set_context(ZP_IMAGE) but that didn't do anything.

Can I just write `` or something?

I hope this post makes sense.




Displaying most recent image in index.php - fretzl - 2018-09-28

If you activate the _image_albumstatistics plugin you can use printLatestImages() which prints the latest image(s) by ID (the order zenphoto recognized the images on the filesystem)
See the documentation for its parameters (https://docs.zenphoto.org/function-printLatestImages.html)

There are also the printLatestImagesByDate() and printLatestImagesByMtime() functions.