i have a template "views-view-field--tracker--name.tpl.php" for a view called tracker, and i am using an If...Else Statement in the template to print fields.
<?php
if ($node ->uid == 0) {
print $view->field['field_authorname_value']->render($row);
} else {
print $view->field['name']->render($row);
}
?>
The above code is not functioning as it should, its printing the first part nicely but not the second part. Though, printing without if statement seems to work ok. eg:
<?php
print $view->field['name']->render($row);
?>
Not sure whats wrong with the code, so looking for answers