I have a views block that shows nodes in some conditions. The views has pager and normally it works but if I use Global: PHP field the pager doesn't work and it only show the first page.
The Global: PHP field is as below:
- Value Code: emtpy
- Output Code:
->
<?php if ($row->type == 'book') { ?>
<i class="fa fa-book fa-lg fa-fw"></i>
<?php }
elseif ($row->type == 'article') {
?>
<i class="fa fa-file-text-o fa-lg fa-fw"></i>
<?php }
elseif ($row->type == 'thesis') {
?>
<i class="fa fa-graduation-cap fa-lg fa-fw"></i>
<?php } ?>
UPDATE:
I'm listing the nodes in this views block. There are 3 different content types and what I want to do with this PHP field is to print an icon according to content type. The code checks the content type with if ($row->type == ...)
.
(End of update.)
The PHP field works correctly and gives what I want but I wonder if I do something wrong in the PHP structure.
Do you have any idea what can cause this problem?