firstname.lastname@example.org created the topic: HeadTag: Tag based on category
Thanks for creating HeadTag. I have two sites using partly the same content. HeadTag gave me full control over canonical tags. It is very useful as it is. but If I could automate it somehow, it would make my life easier. What I want to achieve will not work out of the box. But maybe you could develop it for me (and charge me of course).
I have set up site A as master and site B as slave. All content is stored in the master site’s database and the slave site is configured with access to some of the master site’s database tables, enabling it to display articles stored in the master site. But since identical articles are displayed under two very separate urls, I get into duplicate content issues; which I resolve with HeadTag; thank you again.
I write blogs about a variety of things. Some of the blog-articles are suitable for my site A, others only for site B, and the majority are suitable for sites A and B. I store all the blogposts in site A and share some of them for site B.
On page A, I could create categories as follows
(and only display articles of the relevant categories on site :
A -> Displays only on site A, no canonical needed (or canonical points to site A)
B -> Displays only on site B, no canonical needed (or canonical points to site
ABA -> Displays on both sites, Canonical points to site A
ABB -> Displays on both sites, Canonical points to site B
Now, if I could somehow magically achieve that articles of category A and ABA receive a tag like this:
And articles of category B and ABB receive a tag like this:
my canonicals would always be right.
And if this was somehow tied as a rule to the category, it would automatically be right as long as I assign the right category.
So I see two problems:
1. Assigning a default tag-formula to a given category
2. Using a wildcard in that tag-formula for the article.alias
This was a long request. Thank you for your patience.
I look forward to hearing from you. Don’t worry if it cannot be done. Then I stick to my manual process.
michael replied the topic: HeadTag: Tag based on category
I meant to come back to this in order to start a dialog to fully understand what you're trying to achieve, but this post got lost in the shuffle.
I think that some features in 3.7 will be beneficial to achieve what you're working toward here. Specifically, the article/category fields. Using a crafted plugin, and fields per article/category, it would be trivial to create canonical links based in the values of those fields.
The way the fields operate is on a per-article and/or per category basis. I could see creating a category level field for canonical URL which would be the default for any article within that category, then an article field to override the category setting. Then let the plugin figure it out based on the data presented.
Anyway, if you're still interested in doing this - let me know. It's been a month, and I'm sorry it took me so long to find my way back to this post.