There's a review content type on my site with a workflow: I use 'draft' and 'completed' workflow states.
I'd like to create a printer-friendly and pdf-version of 'finished' reviews only, so I'd like to hide the links generated by Print module in any other case.
I tried to modify MYTHEME__preprocess_node()
to achive this with this code, but it didn't work:
if($vars['field_review_workflow'][0]['value'] == '13'){ //sid of 'finished' state
show($vars['elements']['links']['print_html']);
}else{
hide($vars['elements']['links']['print_html']);
}
How could I do it properly?