Forum Discussion
Any way to exclude Templates folder from Highlighted Content Web Part?
No reason to reinvent the wheel
CAML, not KQL, since I'm using "The page library on this site", and that's what I did, as I noted in the post above your reply.
But I had to spend well over an hour figuring out how to make this CAML query, never having done it before (learning the syntax, discovering the "Scope" parameters, etc.), for something that shouldn't even be necessary - there's no way templates should be included in "highlighted content" when the page library is the source. It makes absolutely no sense.
And having to tailor queries is a far bigger PITA than selecting fields on the filter UI, which makes this approach problematic for page maintenance/site reuse. I'm the only one on my team who has any chance of sorting out queries at this level. My non-tech-savvy content collaborators shouldn't have to deal with this complexity for something so simple.
- Jun 07, 2023Yeah Caml query is super old school and shouldn't be used. That's why I said KQL 🙂 KQL query is a lot easier and more modern, just say path, type and what you need to exclude 🙂
- DavidWexelblatJun 08, 2023Brass ContributorWhether the query is KQL or CAML depends on which source chosen for the HCWP. Since I'm looking at "The page library on this site", CAML is what it takes. I can play around with one of the larger sources and KQL, but my base issue still holds - my collaborators have no chance of being able to deal with any query language, and it just shouldn't be needed for this use case.