Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
It would be great to have more metatags available, e.g."robots".
Example:
<meta name="robots" content="index, follow" />
and more generalized something like:
<meta name="$name" content="$value" />
as a multi valued field.
cheers, Ronald
Comment | File | Size | Author |
---|---|---|---|
#8 | beanstag.module.txt | 11.2 KB | ykyuen |
Comments
Comment #1
ykyuen CreditAttribution: ykyuen commentedFor simplicity, i just set page title, meta keywords and description in the beanstag form. The generic approach would be a nice feature but that requires a big change on the module db schema and code.
Except robots, whatelse of meta name attributes would u like to add? i could make a quick fix for you first.
Comment #2
rokr CreditAttribution: rokr commentedAt this time robots would be the most important. We really like the approach of beanstag and evaluating it for a site where SEO maintainers don't want to take care about site structure (nodes, panels, views, etc).
thanks, Ronald
Comment #3
vintorg CreditAttribution: vintorg commentedyk, this is a great module. Can you add support for canonical tags?
Comment #4
ykyuen CreditAttribution: ykyuen commentedHi rokr,
i will try to complete the robot feature just like the keywords and description entries. currently i will not implement the generic approach.
It should be done in the coming 2 days.
Hi vintorg,
Are you looking for sth like
<link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish"/>
If this is what you need, i will try to add it for you too. should be ok in coming 2 days.
Regards,
Kit
Comment #5
vintorg CreditAttribution: vintorg commentedHey yk, yes! That would be perfect!
Comment #6
ykyuen CreditAttribution: ykyuen commentedHi rokr and vintorg,
i have committed the changes. please checkout the latest code and run update.php as it involves schema changes.
After the update, you can enable the meta robots and canonical @admin/config/search/beanstag.
Once you have enabled the 2 new options, you could find the 2 new options when adding/editing beanstag just like the meta description and canonical.
Let me know if there is any problem.
Regards,
Kit
Comment #7
markomat CreditAttribution: markomat commentedGreat work, Kit! Thanks for adding the new fields. I'm really looking forward to actually use the module.
I just tried out the latest version and it works pretty well. But I noticed that the new Canonical tag is just added to the header, it's not replacing the default element (even with vverriding). So you get two canonicals which might confusing.
I added a few lines to the function beanstag_html_head_alter() to unset the default canonical if the override option is activated.
Sorry, i could not write a proper patch.
What do you think?
Cheers
Mark
Comment #8
ykyuen CreditAttribution: ykyuen commentedHi Mark,
Thanks for your snippet, but i think it would be better to check the existing canonical link before adding the beanstag meta_canonical, so i add the checking at
This can ensure no double canonical links are rendered.
I have tested, seems it works fine. Would you help to try the attached .module file?
If it works for you, i will commit the changes to the drupal repo.
Thanks for your code. =)
Comment #9
markomat CreditAttribution: markomat commentedWow, you are fast!
I tested your update and it seems to work as it should. - very cool.
Thank you.
Comment #10
ykyuen CreditAttribution: ykyuen commentedCode committed, thanks again for your code. =D
Comment #11
ykyuen CreditAttribution: ykyuen commented