Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a node has keywords and description entered already and there is also a path-based rule setup for the URL path of that node, the keywords and description from the URL path are used. I want it to use the keywords and description from the node though. How can this be done?
I tried setting the weight for the given rule to 10. That didn't work.
Comments
Comment #1
univate CreditAttribution: univate commentedThis module really works the other way, it allows you to override meta tags from nodewords, by specify specific rules.
The meta tags in this module are stored separate to the meta tags in the nodewords module so the weights are apply within this module.
Comment #2
OneTwoTait CreditAttribution: OneTwoTait commentedYep, correct, that's the problem.
It should follow the pattern:
A - Use meta tags stored with Meta Tags (nodewords)
B - If there are no meta tags entered for that node, use the pattern from Meta Tags by Path
Additionally, the weights set with Meta Tags by Path do not seem to have any impact on this issue. I've tried setting the weight to "10" for a rule and it still uses the meta tags from Meta Tags by Path rather than using the meta tags set with Meta Tags (nodewords).
Comment #3
univate CreditAttribution: univate commentedThis module is not designed to do that... thats because the order the nodewords invokes this module (after it attempts to load meta tags itself), it allows this module (and other modules) to override meta tags if a specific rule is matched.
Meta Tags by Path is really designed to provide a way to add meta tags to other pages that aren't nodes, since you already have nodewords to do that. So if the path matches the rule it will get the specific meta tags always.
As I said previously the weights in this module only apply within this module for deciding which rules to match:
Ie: if you create rules for:
1) /path* (weight: -10)
2) /path/name (weight: 0)
The weights will ensure that if you hit /path/name you will get the (2) meta tags, while if you hit any other /path/somthing url you will get the (1) meta tags.
Comment #4
OneTwoTait CreditAttribution: OneTwoTait commentedOK, I understand it is a design issue. I was hoping that I just configured something wrong.
If Meta Tags by Path worked as the fall-back for when there are no meta tags entered (as described in post #2), that would be useful. I have one site in particular that has both editor-added content and user-added content. We don't give users access to the meta tags fields because they would either find it confusing or abuse it. Using this method we could have the best of both worlds.
Comment #5
planctus CreditAttribution: planctus commentedThis is crucial, i think that this module would really enhance the meta tags module usability but they should work together and not alternatively.
What i mean is that many of us use to build sites with rational paths where a section would be easily triggered by a path rule using this module.
But we should use this as a general rule where the node's meta tags stands as the most precise one and it should not be overwritten by the general rule since this should be used as an alternative when the node doesn't provide a specific one.
Anyway..thanks for this module,
i think i cannot use it as it is, i'll try to see if something else is available on the drupal platform.
Da.