Can the carousel be set to show newest object representations?
Does anyone know if there is a configuration setting that would show only the newest objects representations on the home page carousel?
Thanks,
Mark
Does anyone know if there is a configuration setting that would show only the newest objects representations on the home page carousel?
Thanks,
Mark
Comments
Hi Mark,
As far as I know, not directly. What I know is that you can set this carousel in two manners:
front.conf
file to specify which set is used. This file contains:So on the first parameter
front_page_set_code
, you give the code of the set you want to use. This code is the one you give when creating a set (see screen capture). You can have more than one set and sometimes change which one is displayed on the front page, just by changing thefront_page_set_code
.If you set
front_page_set_random=0
, items will be displayed always in the same order as they are in the set.If you set
front_page_set_random=1
, items will be shuffled.If
front_page_set_code
does not correspond to an existing set, the front page will display random objects.So one way to show the latest objects in carousel is to create a set and manually add latest objects to it... It's a bit boring. But maybe that will satisfy you.
There could be another way... but that would require modifying the php code in
app/controllers/FrontController.php
😬I just found an easy way!
In fact, in
app/lib/BaseModel.php
, there are these functions:The last one is called in
app/controllers/FrontController.php
, but you can replace it bygetRecentlyAddedItems
to display newest objects. To do so:app/controllers/FrontController.php
file, in case you break something...getRandomItems
(should be at line 78 or nearby), just replace it bygetRecentlyAddedItems
.