Skip to main content
10 events
when toggle format what by license comment
Feb 15, 2021 at 13:01 history edited avpaderno
edited tags
Apr 13, 2017 at 12:47 history edited CommunityBot
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Mar 29, 2012 at 18:07 vote accept Philipp Horn
Mar 29, 2012 at 17:41 comment added Countzero Done. See answer below.
Mar 29, 2012 at 17:40 answer added Countzero timeline score: 3
Mar 29, 2012 at 15:34 comment added Philipp Horn Great...that's exactly the right place! You might want to post that as an answer :)
Mar 29, 2012 at 15:19 comment added Countzero So then you could implement something in the view template for the JSON display, but I don't know if there's one. The correct file to modify seems to be views-views-json-style-simple.tpl.php.
Mar 29, 2012 at 15:04 comment added Philipp Horn It won't do any harm but it won't solve my problem either :) Everything I do to $view->result only affects the JSON array that is the value for "nodes" but instead I want to add a new string/value pair at the same level as "nodes"
Mar 29, 2012 at 14:28 comment added Countzero If I understand correctly, you just have to use the same hook as in the other post, but just cange the structure of the new result array. I didn't test this, but chances are good that adding a new element to the $view->result object won't do any harm.
Mar 29, 2012 at 10:17 history asked Philipp Horn CC BY-SA 3.0