Change icon based on document extension

Hello,

Is it possible to show a different icon based on document extension?

I’m using ACF Repeater to add documents to the page, but I’m unsure how to connect it with different icons in Cornerstone.

I did try to put a PDF icon element with a condition string {{dc:looper:field key=“dokument.subtype”}} is .pdf, but that doesn’t work.

Can you point me in the right direction?

Best regards

Hello @ofirdoo,

Thanks for writing to us.

In order to help you with your concern, please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password
  • Exact page URL

You can find the Secure Note button at the bottom of your posts

Thanks

Hello,

I added access data.

Best regards

Hello @ofirdoo,

I would suggest you please set the conditions type to string. You need to insert this dynamic content code and use the “IS” operator to compare the string. Please have a look at the given screenshot below.

{{dc:looper:field key="dokument.subtype"}} is "pdf"

{{dc:looper:field key="dokument.subtype"}} is "plain"


Thanks

Thank you.

You are most welcome, @ofirdoo

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.