Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
adrianmak's picture
Asked by on Wed 4th Mar 2009
How to put a "new" post indicator/icon aside in a views

For example I created a view to filter a content node type
For new posted articles a “new” indicator/icon shown aside
similar as the image posted below

And the icon will be shown for example a week time counted from the post created date and it will then disappear.

I’m think of override a views hook and using like
if current time minus node created_date is equal or greater than a week , then add custom variables

$vars['newicon'] = '<span><div class="newicon"></div></span>'

something like that
and then in views template can print variable $newicon if not nil

Commenting on this Drupal Question is closed.