Hello to all,

i am trying to print the output of a view into a field, but i do not want it to change as a reference.

To be specific i want to count some taxonomy terms then print only the current number of them in my node. I do not want that number to change when i add more terms. Lets say as a static view reference.

I have made the view, is ok, but cannot store an unchanged value.

Any ideas?

Thank you

Comments

Stefan Lehmann’s picture

How to programmatically retrieve the results of a view:
https://api.drupal.org/api/views/views.module/function/views_get_view/7....

How to load & save a node via Entity metadata wrappers:
https://www.drupal.org/docs/7/api/entity-api/entity-metadata-wrappers

Combine the two. :-)

I like cookies!

mkapst’s picture

thanks for the answer i will try that