Ok heres what ive managed to achieve, it may be useful to you
- Define a view that filters nodes based on taxonomy terms
- Have that view render the related nodes via Smarty template engine
- have the flexinode's also available to smarty but use proper naming instead of field ID's
I created a flexinode called "Human or Person" and a view called "About our team" which is a view containg a list of nodes that are related by taxonomy.
The flexinode template is called flexinode-HumanOrPerson.tpl
The view template is called view-AboutOurTeam.tpl
In my bluemarine_smarty theme folder i create a "smartytemplate.php" and added the following
<?php
// all views go via here..
function smarty_views_view($view, $type, $nodes) {
$i=0;
foreach($nodes as $node) {
$result = db_query("select flexinode_data.*, flexinode_field.* from flexinode_data
left join flexinode_field on flexinode_data.field_id= flexinode_field.field_id where nid=%d",$node->nid);
if(db_num_rows($result)) {
while( $dbobj = db_fetch_object($result) )
$viewobject[$i]["flexinode"][preg_replace("/[^\w\d]/","",ucwords($dbobj->label))]=$dbobj; // Ask for it by array offset
$i++;
}
}
// view filenames are view-AboutOurTeam.tpl etc in current theme path
$viewfilename="view-".preg_replace("/[^\w\d]/","",ucwords($view->name)).".tpl";