XF 2.1 Sitemap excluding no reply threads

dethfire

Well-known member
Looking for advice on how to accomplish this. I see this code in src/xf/sitemap/thread.php

$threads = $threadFinder
->where('thread_id', $ids)
->with(['Forum', 'Forum.Node', 'Forum.Node.Permissions|' . $user->permission_combination_id])
->order('thread_id')
->fetch();
 
You can extend the sitemap handler. You can't change the finder configuration without overriding the getRecords() method entirely, but you can extend the isIncluded() method to account for this by checking the reply_count of the thread.
 
Back
Top Bottom