In a template file, how can I use PHP to print some text if a view has a certain value?
The view uses the node ID, so I guess this argument needs to be passed to the view (as it would be if the view was embedded onto the page).
Here is my attempt:
<?php
$view = views_get_view('hide_weight_2');
if ($view->execute_display('default', $args) == 'Yes' ):
?>
<h1>Result of view was yes</h1>
<?php endif; ?>