In this post, I am going to share a script which can help you find all the pages which contain a keyword in its content. This requirement came from the business team who wanted some insights about pages which use keywords like finance, commerce etc. One can easily get this information from search functionality on Sitecore site or client. Or one can always create a powershell script and generate a report that can be shared with business users (yes, they love reports). We had a few assumptions - We looked for keyword only in Rich text fields. You can modify script to include more field types. We needed the page links rather than Sitecore content path as the business users were not familiar with Sitecore. Mostly, the keyword was present in content items placed within _content folder under the page. For such items, we preferred to resolve the URL to the page ancestor to the content item. For this, we checked if the item path contains _content . If yes, then we limited the URL to page ite
This blog is created to serve as a repository of quick tips for Sitecore developers. I have learnt a lot from the programming community and this is my attempt to give back to the community.