I need to flag nodes that were created within the last two weeks or modified within the last two weeks (created takes precedence over modified). I'm drawing a blank on how to do this in Views 3. "Rewrite results" is just a text field, not PHP.
Nancy
Sometimes the answer is easy and the question is complicated. -- Dr. Seuss
Nancy
Assuming you need to do it with PHP (I'd need to think about whether it could be done otherwise), you could have a PHP field using Views PHP, http://drupal.org/project/views_php
My first reaction was a view that had a date filter that selected the last two weeks.
Gregg Marshall, CPMR, CSP, CMC
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Nancy E Wichmann Sent: Wednesday, November 30, 2011 10:35 AM To: support@drupal.org Subject: [support] New/Modified Flags With Views
I need to flag nodes that were created within the last two weeks or modified within the last two weeks (created takes precedence over modified). I'm drawing a blank on how to do this in Views 3. "Rewrite results" is just a text field, not PHP.
Nancy
Sometimes the answer is easy and the question is complicated. -- Dr. Seuss
This is not a filter - it's an additional piece of information. It ends up adding a flag (literally) to the left side on the node display saying "Recently Added" or "Recently Updated". Now, this could just as easily be a node class as that could result in a CSS rendering of the flag. Obviously, I could do this in custom code easily, but I am trying to leave an easily updated/maintained site behind me, so I'm looking to Views to be more self-documenting.
Nancy
Sometimes the answer is easy and the question is complicated. -- Dr. Seuss
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Gregg Marshall Sent: Wednesday, November 30, 2011 2:28 PM To: support@drupal.org Subject: Re: [support] New/Modified Flags With Views
Nancy
Assuming you need to do it with PHP (I'd need to think about whether it could be done otherwise), you could have a PHP field using Views PHP, http://drupal.org/project/views_php
My first reaction was a view that had a date filter that selected the last two weeks.
Gregg Marshall, CPMR, CSP, CMC
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Nancy E Wichmann Sent: Wednesday, November 30, 2011 10:35 AM To: support@drupal.org Subject: [support] New/Modified Flags With Views
I need to flag nodes that were created within the last two weeks or modified within the last two weeks (created takes precedence over modified). I'm drawing a blank on how to do this in Views 3. "Rewrite results" is just a text field, not PHP.
Nancy
Sometimes the answer is easy and the question is complicated. -- Dr. Seuss
One of the options in that module is a field of type PHP that you can put arbitrary PHP code into.
Gregg
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Nancy E Wichmann Sent: Wednesday, November 30, 2011 12:46 PM To: support@drupal.org Subject: Re: [support] New/Modified Flags With Views
This is not a filter - it's an additional piece of information. It ends up adding a flag (literally) to the left side on the node display saying "Recently Added" or "Recently Updated". Now, this could just as easily be a node class as that could result in a CSS rendering of the flag. Obviously, I could do this in custom code easily, but I am trying to leave an easily updated/maintained site behind me, so I'm looking to Views to be more self-documenting.
Nancy
Sometimes the answer is easy and the question is complicated. -- Dr. Seuss
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Gregg Marshall Sent: Wednesday, November 30, 2011 2:28 PM To: support@drupal.org Subject: Re: [support] New/Modified Flags With Views
Nancy
Assuming you need to do it with PHP (I'd need to think about whether it could be done otherwise), you could have a PHP field using Views PHP, http://drupal.org/project/views_php
My first reaction was a view that had a date filter that selected the last two weeks.
Gregg Marshall, CPMR, CSP, CMC
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Nancy E Wichmann Sent: Wednesday, November 30, 2011 10:35 AM To: support@drupal.org Subject: [support] New/Modified Flags With Views
I need to flag nodes that were created within the last two weeks or modified within the last two weeks (created takes precedence over modified). I'm drawing a blank on how to do this in Views 3. "Rewrite results" is just a text field, not PHP.
Nancy
Sometimes the answer is easy and the question is complicated. -- Dr. Seuss