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.
When you overrule the taxonomy term pages using views, the META tags are not displayed.
You can 'fix' this with path-based META tags but that's not ideal in most use-cases.
The path below fixes this issue.
Comment | File | Size | Author |
---|---|---|---|
#7 | metatags_quick-taxonomy-views-1509632-7.patch | 3.4 KB | Phizes |
#2 | metatags_quick_1509632_taxonomy.patch | 1.44 KB | jeff.maes |
#1 | metatags_quick_1509632_taxonomy.patch | 0 bytes | jeff.maes |
Comments
Comment #1
jeff.maes CreditAttribution: jeff.maes commentedComment #2
jeff.maes CreditAttribution: jeff.maes commentedComment #3
valthebaldIs it possible to use views-specific hooks instead of hook_page_alter? Thus no need to check if views module is enabled
Comment #4
jeff.maes CreditAttribution: jeff.maes commentedI don't think views-specific hooks will make this possible because you only can change the result-set of the view and not the 'wrapper' page... Or am I wrong on this?
http://drupalcontrib.org/api/drupal/contributions%21views%21views.api.ph...
Comment #5
betz CreditAttribution: betz commentedTested and works flawlessly.
Thanks for this.
Can this be committed?
Tom
Comment #6
Phizes CreditAttribution: Phizes commentedIt is, I had a working implementation I've been meaning to contribute but I had a hard drive failure, I will get it completed in the next week or so.
Additionally the patch above uses
_metatags_quick_known_fields()
to get the fields which should be rendered, I'm pretty sure this would not render any custom created meta tag fields.Comment #7
Phizes CreditAttribution: Phizes commentedHere is a patch using a views hook, it does add a views include file. Feedback would be appreciated on how I have done it.
Apologies for the cruft, I have no idea why the it is there other than it having non-unix line endings perhaps. I spent roughly 2 hours trying to produce a clean patch to no avail. If I checked out the metatags_quick.module file, opened it, made no changes and saved it again, git would still show those lines as having been changed. Applying the patch will also result in whitespace errors, though I think that is related to the code around the cruft (Which does have extraneous white space) as I can't find any on my actual changes.
If anyone has any idea on how I could roll a cleaner patch, please let me know.
Comment #8
betz CreditAttribution: betz commentedThat looks like a better solution indeed.
Thanks for that.
Comment #9
valthebaldCommitted to 7.x-2.x
Thanks to everyone!
Comment #11
esquareddesign CreditAttribution: esquareddesign commentedI have not been able to get this to work. It errors out every time I upload the patched files. any help would be appreciated.
Comment #12
Phizes CreditAttribution: Phizes commentedThis has already been committed to the 7.x-2.x branch a while ago, so the patch wouldn't apply to it. In commit ccda915 for metatags quick. There is no need to patch new versions as the code is already in the newer releases of this module.
Comment #13
esquareddesign CreditAttribution: esquareddesign commentedHm, I am using the latest release and I can still not get the meta tags to show up on my taxonomy pages that I have overwritten with views. I have reinstalled the module, dumped the cache, even tried path-based meta tags. is there something I am overlooking?