Additional data sources

wibe - March 4, 2009 - 15:11
Project:Integrated Metatags
Version:6.x-1.0-beta7
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

First off -- great module, I love how it automates all my meta tag issues. I have a feature request, I'll demonstrate with an example.

I am using the community tags module that allows users free content tagging. I'd like to use these tags (taxonomy terms) as meta keywords. I can do that right now with specifying "term.*.name" as my data source. However, this just gives me a list of all the terms, sorted alphabetically, with no choice of alternate sorting, weighting, or filtering. In my case, I would want to pick the most popular tags and limit it to a certain number.

One possible way of doing this could be using Views. I could create a view that gives me a list of terms in a certain order. Now, if I could feed this view into Integrated Metatags, that would be great.

I could see how this could be useful for many people in many different ways. This is probably somewhat involved, though...

#1

fractile81 - March 4, 2009 - 22:17

This is a very interesting idea. I think the idea needs some thinking through before I try to whip out any code, but if you need something more immediate, you can play with $node->int_meta and the associated objects, if you'd like. I know my documentation is somewhat lacking on how to interface with that, but if you add a tag or two through the regular interface and then print out that property, you should be able to see how it's structured and be able to augment the Metatags like you're suggesting.

It's true that using a View may be somewhat involved. My biggest concerns would be 1) how would you pick which view to use, 2) the view would have to be specially crafted to interface properly (or the Int Meta code would have to have a lot of options), and 3) that it might impact performance in unforeseeable ways.

If you have any further ideas on this, please suggest them! This may not be in by the v1.0 release, but is certainly something I could start looking at for v2.0.

#2

wibe - March 5, 2009 - 00:33

On second thought, a better approach might be to do what CCK does. When you define a field, CCK offers under "Default Value -> PHP Code" (for advanced users) the option of writing a piece of PHP code that provides the default value. Perhaps Integrated Metatags could offer a similar option...

I am going to think a little more about this, too, but this might be a good approach that's not too involved.

 
 

Drupal is a registered trademark of Dries Buytaert.