-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering out Elements in Sitemap #1553
Comments
Can you tell me what you're trying to accomplish here? |
So, let's say, as an example, we have a section named Posts with 20k entries in it and there is a lightswitch field in the field layout. By default, Seomatic Sitemap will generate 40 index sitemaps (500 entries each). Tried doing that with event i mentioned above, but result was still 40 index sitemaps, although, most of the were empty. |
Managed to achieve this by modifying Element Query, through an event, before it gets processed by Seomatic's Sitemap Controller and guarding it by checking Would be super sweet to have the event in Sitemap Controller where |
Right so what I mean is on a higher level perspective... what are you trying to do by excluding some of these entries from the sitemap? Normally, you'd just set the entry to Disabled which would cause it to not appear in the sitemap, and also cause the URL to not respond on the frontend. You generally don't want to bother excluding an entry from a sitemap unless the URL isn't publically available as well. |
So, i guess i will go into more specific details on what we need. We have a massive category group. Some Categories there are supposed to have URLs, some lead to search page with predefined query and some have neither. We only want to add to the sitemap the ones that have URLs and are actual pages. |
Hrm. Interesting IA challenge. So you want an event thrown that allows you to modify the Sitemap query before it is executed, essentially? |
Exactly, that would be amazing! |
Hello,
is there a way to filter out Elements based on field values when generating sitemap, but without creating sitemap indexes?
Tried with
IncludeSitemapEntryEvent
event, but since we have large amount of Elements, SEOmatic still generated empty sitemap indexes for the number of all Elements before filtering out.The text was updated successfully, but these errors were encountered: