flare

Events happening in the community are now at Drupal community events on www.drupal.org.

Drupal + Flex + Flare = Coolness

Posted by interfaced on February 20, 2008 at 10:12pm

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
1 comment Categories: , , ,
Subscribe with RSS Syndicate content

AltStyle によって変換されたページ (->オリジナル) /