I have the following script to return search results of linked pages. I need to filter out the duplicates of the alias pages, as well as sort the results alphabetically. Current
In your DocumentQuery, add .FilterDuplicates()
and it should remove those duplicate records for you. Keep in mind it will NOT bring back Linked Documents, only the main document.
*** UPDATE *** Based on updated question, the query that you updated your question with looks like a Kentico generated query. I'm not sure why it was created but I'd set that repeaters visibility to false and add a new repeater on the page and set the properties as you see fit. Then update the WHERE conditions as needed.