So I've been using token replace for a while now with great success in my themes. For instance I'm using it currently to show the real name of an author by using
<?php print token_replace('[node:author:url]', array('node' => $node)); ?>">
The issue is that I've recently added a byline field in my storys and not all stories have a byline. I've added it normally by using
<?php print token_replace('[node:field_byline]', array('node' => $node)); ?>
However when the field is empty it simply prints [node:field_byline] so I get stories like...
Is there a way to check that the token field has something in it and only show that field if there's a value? I'd like to just show nothing if there are now authors for the byline. I tried using something like:
<? !empty [node:field_byline] ?>
but this hasnt worked. Ideas?