Drupal Views Code


/ Published in: PHP
Save to your folder(s)

Display first article one way and following ones a different way


Copy this code and paste it in your HTML
  1. <?php if ($count == 0): ?>
  2. <div class="view-field view-data-created">
  3. <h3>First Article</h3>
  4. <?php print $created?>
  5. </div>
  6.  
  7. <div class="view-field view-data-body">
  8. <?php print $body?>
  9. </div>
  10. <?php else: ?>
  11. <div class="view-field view-data-created">
  12. <?php print $created?>
  13. </div>
  14.  
  15. <div class="view-field view-data-body">
  16. <?php print $body?>
  17. </div>
  18. <?php endif; ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.