strapi-plugin-sitemap icon indicating copy to clipboard operation
strapi-plugin-sitemap copied to clipboard

Support excluding sites by condition

Open JWandscheer opened this issue 1 year ago • 2 comments

Feature request

Summary

It would be nice to support excluding Pages from the sitemap by model-attributes.

Why is it needed?

For example: We have a model "TeamMember" which has a boolean attribute hasProfilePage. The frontend can only show the profile page of this person, if this value is true. The sitemap unfortunately contains all members with their slugs, which leads to 404 errors if hasProfilePage is false

Suggested solution(s)

In the Sitemap url bundles popup, add an area for building conditions for in- or excluding pages based on model attributes.

Related issue(s)/PR(s)

I think this would be solved by https://github.com/boazpoolman/strapi-plugin-sitemap/pull/109

JWandscheer avatar Jul 14 '23 16:07 JWandscheer

If I might add another enhancement what is related to this one and also the PR that is mentioned in it:

The current implementation does not allow to have multiple instances of content types ( * language) in the URL bundles. If you have a bundle with a content type, you can not create a new one for that type, only edit the old one. But it would be great to be able to not just filter entries on the content type, but map those filtersets to different URL bundles.

Why is it needed?

Take a model of Project that has states: planning, doing, done. The URL for each state can be different in the frontend like: /coming-soon/[id] , /what-we-do/[id], and /what-is-done/[id] with the respective states as filters.

Suggested solution

The url bundles can be grouped/unique by type, langcode AND pattern (and/or filter?)

laszlo-san avatar Nov 15 '23 11:11 laszlo-san

That seems like an excellent addition to this feature request. Thanks @laszlo-san

boazpoolman avatar Nov 20 '23 07:11 boazpoolman