Is it possible to add an 'if' statement for a content type in a custom views-view.tpl.php
?
This is just so I can add text to show if the post in the view is either an 'episode' or an 'announcement'. The content type is called announcement.
I want to do this because I need to identify and style differently based on the post type:
- If it's from an episode, it displays the episode number.
- If it's an announcement, it says announcement.
So basically something like so:
<?php if (content_type='whatever') {... code goes here ...} ?>
If this is possible, can you provide an example?
Note: I have a custom theme called views-view-field--first-post--block--created.tpl.php
and all it has is <?php print $output; ?>
. It's called a field content date.
Also, this is what the output of the entire view looks like: stdClass Object ( [node_created] => 1434783086 [node_title] => CTRL Daily Episode 11 [nid] => 11 [node_type] => ctrl_daily )
. [node_type] is what I want.