flare

Events happening in the community are now at Drupal community events on www.drupal.org.
interfaced's picture

Drupal + Flex + Flare = Coolness

Hey, I've set up a data pipe from Drupal to Flex/Flare using jQuery. Its as easy as this:

  1. IN DRUPAL TEMPLATE.PHP
    function phptemplate_views_view_list_{viewname}($view, $nodes, $type) {
    foreach ($nodes as $i => $nid) {
    $node = node_load($nid->nid);
    $output[]= json_encode($node);
    }
    return 'var videos=['.implode(',',$output).']';
    }

  2. IN THE HTML-TEMPLATE

<

script type="text/javascript">
function getData(){
$.getScript("http://example.com/view", function(){
/*$(videos).each(function(i){

Read more
Subscribe with RSS Syndicate content