I have added a content type in Drupal 7 which contains only a file field. Every file needs to contain an array like the following:

'rows' => array(
   array(0,0), //(x,y) values

I want from the view module to read the content of the file and send the array to the selected graph type; for example, the user select a file and then a pieChart graph.

how can the content of the file be send to the pieChart library? Is that possible from the Views module? What function have to be added to the view plugin in order to send the content of the file to the selected library?

1 Answer 1


You will probably have to create a library, module, or simple a function Wick does the logic of this, and then call the function from where you want (views).

It's a pretty generic question, without more info is difficult to know what you are trying to achieve, but in similar situations what we use to do is create a separate library or module which is called from cron, for example.

This library will keep updated a second content type, with the contents of your files, RSS, XML, etc.

When views saves this content, you'll simply have to link both content types, probably making it faster simply reading contents and leaving the logic to a background process (managed by cron).

But again, maybe you are trying to achieve a different thing.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.