I want to show a list of attachments, but only if there are any. If not, hide the containing div. How do I do this? Thanks!
How to count the number of grouped attachments for a page in kentico 9?
329 Views Asked by anonymouse At
2
I want to show a list of attachments, but only if there are any. If not, hide the containing div. How do I do this? Thanks!
Assuming that you are showing a list of attachments on the current document, you can get the number of grouped attachments with a macro:
DocumentsAttached
would be the name of the field that contains the attachments.On your attachments list webpart, you can set the value of the visibility field to the following macro: