Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@DeanOBrien we already have a way of adding the cache buster (based on build number) and we use it in other areas of the code. I was hoping there was a way we could combine it with the RenderFormScripts function (which seems to be clever enough to only include the JS files IF there is a form on the page) but it looks like we will just have to try and replace that call with custom code
Thanks for that - and in a way your examples/rational make sense though I don't see a real problem with dummy data, etc on DEV and nowhere else. Sure, the deployment of content changes to UAT and PROD might be harder but it just sounds so much more sensible than "everything you have done, for this new feature, on DEV ? Now do it all again and UAT and PROD rather than just publishing DEV to UAT and PROD".
Ah, ok., Thanks. I misread your first answer and thought GetReferrers() only accepted media libray items. So getrefferers tells me which components/placeholders/etc is using a particular media item; I would then need to work out whether those items are used by the item I am interested in ? Finally, hopefully, is it also possible to restrict the GetItem call to certain asset types say JPGs and PDFs ?
Thanks for the reply. Does GetReferrers() find all items that use the media item in any way ? Or only items that directly relate to it via, say, an image field on the item ? Our issue is that many/most of our pages contain multiple components, sub-views, renderings, placeholders. etc which can themselves contain/relate to media library item i.e the item itself has no image fields on it at all but when rendered the displayed page could contain any number of images. We need to find all of these media items as well