We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37166
    • 11 Posts
    Is there a way to find where a particular snippet or other object is being used on the site?

    This would be a real nice way to verify usage of an object before making any changes.

    Thanks,
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Actually those are "elements".

      And to answer the question, as far as TVs, snippets and chunks go, there is no way to tell where they are being used. Templates are specified in a resource's database record and while TV values are also connected directly to resource IDs in a database table, where the actual TV tags are used isn't noted. Since chunks and snippets aren't limited in any way, there's no way to keep track of where their tags are used. A database query could be used to find tags in resources and templates, but then all tags can be used in chunks or TVs as well as in templates and resource fields and content, as well as being accessed via PHP code in snippets or plugins. So there's really no reliable way to determine where one may be used.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 37166
        • 11 Posts
        Thank you.