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 meta robots noindex if node is of type Neos.Seo:NoindexMixin #86

Closed
1 of 3 tasks
jobee opened this issue Dec 27, 2018 · 4 comments · Fixed by #90
Closed
1 of 3 tasks

Set meta robots noindex if node is of type Neos.Seo:NoindexMixin #86

jobee opened this issue Dec 27, 2018 · 4 comments · Fixed by #90

Comments

@jobee
Copy link
Contributor

jobee commented Dec 27, 2018

This is a (multiple allowed):

  • bug
  • enhancement
  • feature-discussion (RFC)

What you did

added Neos.Seo:NoindexMixin as supertype to a document nodetype to prevent those documents from indexing

Expected Behavior

  • not listed in the XML sitemap
  • meta robots noindex,follow

Actual Behavior

  • not listed in the XML sitemap
  • meta robots index,follow

This should probably fix it, what do you think?

prototype(Neos.Seo:MetaRobotsTag) < prototype(Neos.Fusion:Tag) {
    tagName = 'meta'
    attributes {
        name = 'robots'
        content = ${(q(node).property('metaRobotsNoindex') || q(node).is('[instanceof Neos.Seo:NoindexMixin]') ? 'noindex' : 'index') + ',' + (q(node).property('metaRobotsNofollow') ? 'nofollow' : 'follow')}
    }
}
@Sebobo
Copy link
Member

Sebobo commented Dec 29, 2018

This should only happen if you add the super type at a later date as it sets the defaultValue of the property metaRobotsNoindex to true.

But your change of course makes it fully reliable so could you create a PR? The solution looks correct 👍

@jobee
Copy link
Contributor Author

jobee commented Dec 29, 2018

Hm, you are right, but... in case the property is already set to false (happens if I check > apply > uncheck > apply ?!) a node:repair won't set the defaultValue.

I will provide a PR for full reliability as suggested :)

@Sebobo
Copy link
Member

Sebobo commented Jan 30, 2019

@jobee hi, any update on the PR? :)

@jobee
Copy link
Contributor Author

jobee commented Jan 30, 2019

@Sebobo sorry, missed that one :) PR will be ready tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants