flare
Drupal + Flex + Flare = Coolness
public
group: Adobe Technologies
interfaced - Wed, 2008-02-20 22:12
Hey, I've set up a data pipe from Drupal to Flex/Flare using jQuery. Its as easy as this:
-
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).']';
} -
IN THE HTML-TEMPLATE
function getData(){
$.getScript("http://example.com/view", function(){
/*$(videos).each(function(i){

