I made a custom template for my view to print fields into a custom html syntax. The problem I have is that in the view I am calling all content types. Now, in my template file I want to display certain information depending on what content type the content is coming from.
For instance, I want something like this:
If (node->type['animals']{
print 'this is the animal node';
}
else{
print 'this is not the animal node';
}
My fields inside the view are printed as follows, but this works:
<?php print $fields['title']->content; ?>
The only problem I am having is calling the node type.
I tried adding content type to my views in drupal, then tried it that way:
<?php if ($fields['type']->content = 'animals'){} ?>
but the view looks through the document and see that there is a content type with that name, and prints the data anyway.