I want to get all the Sitecore media items on the current page. This could be an image, video, pdf ,mp3 or docx
Has anyone done something similar to this?
What i am currently doing is
- Getting all the renderings on the current item.
- Each rendering has a datasource. So getting a datasource item.
- Now checking each field on the datasource item and if it is a media item then get the Keywords field value.
But I think this will have a performance issue. Or is there any better way of doing this?
Any help or suggestion would be appreciated.
Thanks in advance