Great module. I dare to dream for an added feature that would help me manage my tags -- a report of all of my entity type fields together with their schema.org tag -- and preferably also the "tree" that owns the tag (Event, Person, Thing, Webpage, etc.)

My problem is that I started using the module before I had a good feel for how the taxonomies worked; now I have to go back and fill in blanks or make some changes. I'd rather not have to do it by checking every field individually!

Any suggestions how I might be able to pull a report myself, or create a View? I wasn't able to find a schema.org field attribute available in Views to pull.

CommentFileSizeAuthor
#3 rdfui-addfieldreport-2218575-3.patch3.34 KBcudevdev
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Project: Schema.org » Schema.org configuration tool (RDF UI)
Version: 7.x-1.x-dev »

That's a great suggestion! I'm thinking this might live under the "Reports" tab in the admin section. There is a GSoC student working on a RDF/schema.org UI for Drupal 8, and this kind of report would be good to have there too: https://www.drupal.org/sandbox/sachini/2272937 - I'm moving issue to that project.

cudevdev’s picture

Version: » 8.x-1.x-dev

Working on this now...

cudevdev’s picture

Status: Active » Needs review
FileSize
3.34 KB

Here's the patch. It adds a few new things:

- A new menu item at admin/reports/
- A new report at admin/reports/rdf/fields
It looks like this: http://i.imgur.com/u2yqI0U.png

This first implementation is a 'flat' table. It would be better as a tree, but I'm not sure how to render that.

This little hack:

$reflector = new \ReflectionClass($rdfmapping);
$classProperty = $reflector->getProperty('fieldMappings')
$classProperty->setAccessible(true);
$fieldMappings = $classProperty->getValue($rdfmapping);

is required, since the $fieldMappings are protected and there's no get() method.

This is my first drupal.org patch, so let me know if I've done something wrong.

Thank you scor and Sachini!

Sachini’s picture

Thanks for the patch @cudevdev.
I'll test it and verify.

bunthorne’s picture

I look forward to seeing it when it's available!

Just wondering, though, whether it might not be easier and more productive to make the schemaorg attribute available to Views, perhaps with an editable Administrative View? That would give users the ability to filter and group to their heart's content.

Sachini’s picture

Hi @cudevdev
I can verify that your patch is working. Thank you again :)

However I think we can do slight improvements. This is the wireframe we created. Can you modify it a little bit to include these? (Any new suggestions from you are welcome. )

I'm working on integrating select2 with the module. I think you'd find it easier to get the field widgets once it's committed.

bunthorne’s picture

Can this go into schema.org for Drupal 7 as well?