Skip to content
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

Set regular pages regarding XML sitemap #4186

Closed
wants to merge 1 commit into from

Conversation

Total-Reality
Copy link

@Total-Reality Total-Reality commented Feb 21, 2022

Regarding this issue:
#501

@leofeyer wrote

We want to distinguish between "XML sitemap" and "HTML sitemap" in the future, so we need to adjust the following

Sorry if sth. is wrong, this is my first Contao pull request. This is a first suggestion.

Explanation

  • Nearly the same settings like the settings of the HTML sitemap, but this setting is only for regular pages
  • map_default = no changes in sitemap.xml
  • map_always = it always show this page in the sitemap.xml - independent from the robot settings noindex,nofollow
  • map_never = page won't be added to sitemap.xml

Current problems of this PR

  • We need to change the tl_class of the backend fields below or the position in the palette has to be changed - I think it would be nice to show both sidemap settings side by side, however it is a problem that the XML sitemap field is only visible in the regular page type
  • The new Backend labels are only available in en and de currently

@ausi
Copy link
Member

ausi commented Feb 21, 2022

we want to keep URLs to noindex,follow pages in the XML sitemap.

With this pull request, noindex,follow pages would get removed from the XML sitemap in some cases, so it is against what we have discussed.

@Total-Reality
Copy link
Author

we want to keep URLs to noindex,follow pages in the XML sitemap.

With this pull request, noindex,follow pages would get removed from the XML sitemap in some cases, so it is against what we have discussed.

How do you mean this? A page with noindex,follow will be removed from the XML sitemap only if you set the new XML sitemap setting to map_never. So I don't understand the problem?

@asaage
Copy link

asaage commented Feb 21, 2022

With this i think you would be able to have a site index,follow+map_never and it would be in sitemap.xml.
That's ridiculous isn't it?
If the goal is to have no warnings or errors in google - google simply should get a different sitemap without ambiguous options in the page.

@Total-Reality
Copy link
Author

With this i think you would be able to have a site index,follow+map_never and it would be in sitemap.xml. That's ridiculous isn't it? If the goal is to have no warnings or errors in google - google simply should get a different sitemap without ambiguous options in the page.

That is not true. If you set index,follow+map_never -> this site won't be in the XML sitemap. I tested this already...

@asaage
Copy link

asaage commented Feb 21, 2022

yep your probably right.
I allways struggle to resolve ( X && Y || Z ) the right way without plenty of ( and ) 🤦‍♂️

@leofeyer
Copy link
Member

You can use the contao.sitemap event to modify the XML according to your wishes, so there is no need to add another field to the core. We would only do this if there was no other way to accomplish it or if the majority of users would need it. Both is not the case IMHO.

@leofeyer leofeyer closed this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants