Can I programmatically find a Sitecore item's parent matching a certain template id?
问题 I have a custom Sitecore command that I would like to expand upon to determine if the current item has a parent item matching a certain template id. When the command/button is clicked, I will have access to the current Item . My initial attempt, since I had issues with escaping the FullPath for use in a query, was to loop through the parent item (and then that item's parent, etcetera) to determine if any matched the template. However, there seems like there should be a better way to do this.