Download & Extend

Feedback on nodewords data availability as view fields

Project:Nodewords: D6 Meta Tags
Version:6.x-1.x-dev
Component:Third-party modules integration
Category:feature request
Priority:minor
Assigned:Unassigned
Status:needs work

Issue Summary

Note this may be related to issue 652152 but it was already marked won't fix so I wasn't sure it was appropriate to attach it there.

Attached is the beginning of some code that will allow nodeword data related to a node to be output as a view field. It may be feasible to extend this to allow for finding nodes without a particular type of meta tag.

I wanted to get feedback on whether building this type of integration with views is deemed valuable before continuing further.

To install, unpack the attached file in the nodewords module directory and add the following to nodewords.module:

function nodewords_views_api() {
return array('api' => 2.0);
}

Once installed clear your views cache and you should see a Nodewords group available when adding fields to a view. Currently it will only print the value of the nodeword but it should be possible to print the actual meta tag output.

AttachmentSizeStatusTest resultOperations
nodewords-views.tgz664 bytesIgnored: Check issue status.NoneNone

Comments

#1

Status:active» closed (duplicate)

This feature request is actually a duplicate of #652152: Integration with Views; the explanation of why it's not possible to integrate with Views is explained in that issue.

#2

I believe the information in #652152 is incorrect. If I understand the nodewords table correctly the content for a nodeword entry for an object can be obtained using:

select content from nodewords join TABLE_FOR_OBJECT on id = OBJECT_ID_COLUMN and type = TYPE_ID_FOR_OBJECT and name = 'desired_nodeword_entry';

Views is able to handle this type of relationship in several ways from the extra element in the join definition for the table or by defining a custom relationship handler.

Do I misunderstand the nodewords table structure?

#3

AFAIK, when you describe the relationship between the database table used by the module, and core tables it is not possible to say that the table is related with the table user, or the table node, which what happen to the table node that can contains meta tags associated with a node, or a user profile (or neither of them).

#4

Attached is some code that demonstrates the ability to pull in the content from the nodewords content column as a field for node or user based views. It also has the beginnings of the ability to pull in the content via a relationship though it has a bug at the moment in that you can't specify to use the relationship when picking a field.

To use unpack in the nodewords directory and define

function nodewords_views_api() {
return array('api' => 2.0);
}

in nodewords.module.

After doing so and clearing the views cache you should see the Nodewords group when choosing Fields for any node or user based views. It should list all meta tags available at the time the views cache was cleared and the output should be the raw string from the value array. From there you will be able to see the SQL generated and let me know if I am joining to the nodewords table incorrectly.

AttachmentSizeStatusTest resultOperations
nodwords-views.tgz1.55 KBIgnored: Check issue status.NoneNone

#5

Status:closed (duplicate)» needs review

#7

Component:Code» Third-party modules integration

#8

Will review this for inclusion after the v6.x-1.12 release.

#9

Tagging.

#10

Marked #912430: How to get a list of metatags by node? as a duplicate of this issue

#11

I was also hoping that the Views fields would let me select Nodeword meta fields. I assumed that since my nodes each have their own optional nodeword meta field, then it would be possible to access them.

#12

De-tagging, will review priorities after the next stable release.

#13

Status:needs review» needs work

Will need to be re-rolled at the very least. Also, a proper patch file should be provided.

#14

Hi guys,

does anyone know if this change made it into one of the latest releases?

thanks for all the work
Rich

#15

It didn't, I might see if I can take a look prior to 1.14, otherwise it'll be 1.15.

nobody click here