Displaying images by variable(?)

Disclosure: My motive is pure and unadulaterated laziness. Judge me as you will.

As part of my displays I’ve got an image a day that shows throughout the year and repeats come 1st January.

I’ve got 366 images in my library named in the format ddmm.jpg (hence obviously, 0103.jpg for 1st March). What’s my starting point for creating a layout that calls an image based on current date, that I can set up and not have to touch all year?

I know I can create 366 layouts and schedule them, but like I said…laziness.

Any thoughts?

Hi comedynose, welcome to the community! I like you account name btw :slightly_smiling_face:

You might find the easiest way to create a setup like the one you describe would be to use a dataset that contains all of your daily images, with a date column that can be queried in the layout to decide which image should be displaying. There are many ways of setting up a layout like this but I have created a simple example that may help you get started.

First I create my dataset with 3 columns: Image, Month and Day. You can see in my screenshot how I have configured each column:

Now that we have the columns set up, I’ll add some rows of data for the test:

Now I can create a layout that contains the Dataset Ticker or Dataset View widget to filter and display the rows in the dataset. For my test I set the widget to display 1 item and using the Templates tab I click the Snippets box and choose the Image column, as this is the only thing I want to display.

I then create the following filter query on the Filter tab to only display the image for today:

In case this is not clear in the above image, the filter query is:

MONTHNAME(NOW()) = Month AND DAY(NOW()) = Day

I hope this helps you to create a setup that will ensure that you do not need to make any changes once the layout and dataset are configured and published. Because there is no year information to filter, this layout will continue to run your images every day for as long as you wish without the need for maintenance. When you want to change any daily images, simply upload the new image to CMS and change the image in use in that data row.

Many Thanks.

1 Like

Wow, I came for the product but stayed for the service! Thanks for the swift and comprehensive reply Dan. I’ll get busy on some set up.

Many thanks,

Pete

1 Like
The Xibo Community site uses cookies. What are cookies?