Keyword

Adding class to attachments regarding the extension?

  • Gorast
  • Gorast's Avatar Topic Author
  • Offline
  • Premium Member
More
6 years 1 month ago #169740 by Gorast
Any chance you can think of a way if the attachment is .pdf to add "pdf" class to the <li>. If its a .doc to add "doc" class to the <li>? That way we can make very playful attachment look. :D

Thanks,
Gorast

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #169772 by JoomlaWorks
If you don't add a name in the attachment, then K2 uses the filename for it. Simply grab the file extension from the name with some PHP expression and add a custom class on the <a> element.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum