CMS Collection - Change the link setting for different cards (one page for one card, one PDF for one card)

Hello !

I would like to know if it is possible to link different items on different collection cards.

For example: I have a blog collection, with blog cards, and I want that when I click on card 1, a PDF with an article opens (a file), but when I click on card 2, a link to a video opens. (a link)

Like on the following screen.

Thanks for your help! :slight_smile:

Hugo

Sure! There’s more than one approach you could take to achieve this.

You could use conditionals in your CMS collection list items. If an item has the PDF field filled out, the conditional will show the version of the card that opens in a link. If the PDF field is empty, show the version of the card that opens the page. You’ll just need to build two versions of the card inside of your collection list item template.

You could also split this up into two different CMS collections. One for media items that open as a PDF and one for media items that open a page. Then use something like Finsweet Attributes CMS Combine to combine the two lists into one. CMS Combine - Combine multiple Collection Lists to one Collection List

Hello !

Thank you so much for your help, it works almost perfectly with Finsweet (I just can’t get the cards with merged URLs to the first CMS collection to be included in the filter by date, but it’s already ok as it is)

Concerning the conditions, are you talking about visibility conditions? Because I didn’t really understand how to create such a condition (if there is a PDF then we display it, otherwise we display the URL)

Anyway, thanks again for your help! :slight_smile: