Drupal 7 Views : How to reuse one view for multiple fields OR how to let user select which field view displays? -


my task: have content type have 100+ different numeric fields (big questionnaire ngo yearly reports). 1 field can use views module let user select reports include (for example 1 year) , display nice graph (using example views+charts). have define 100+ identical views, differs field data use.

my question: there way how reuse 1 view definition , change data field id display?

solutions far: found 2 not solutions:

  • create 1 view, export (using features or similar way) , clone export, rewrite field uses source , add. speed creating 1 view each 100+ fields.
  • use module views dynamic fields - allows user select fields display. still have separate definition how display each field, not better add 1 view each 100+ fields.

i suggest writing own views field display plugin! documented within views module folder: views/docs/views.api.php. depending on fields i'm not sure how connect data view.

another alternative use php code field, , figure out way programmatically display data field wanted. downside wont able use field sort/search on filters far know.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -