I am using the premium module to flag certain stories as Premium Content. I'd like to have those stories show an icon next to them as a visual reference to which ones are premium and which aren't.
<?php
if($node->premium) print "<img src=\"/images/pc-logo.gif\" border=\"0\" height=\"15\" width=\"15\" alt=\"premium content\">";
?>
This is the code I'm using, which I believe to be valid, but no icon is being generated next to the premium stories. Any ideas as to why?
Comments
Comment #1
casey commentedComment #2
djudd commentedThanks casey, I guess I didn't have as much of an understanding of this module as I thought. I wasn't aware that the condition needed to be be added to the fields.
For anyone else who needs to do what I have done, here's the basics...
I added premium to my field, and set it to excluded from the display type, because it's output is just plain ugly.
I have then added this code to my Customfield: PHP Code statement:
And it works.
Comment #3
casey commentedYou're welcome.