Needs work
Project:
Panels
Version:
7.x-3.x-dev
Component:
Panel pages
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2010 at 18:50 UTC
Updated:
11 Jul 2016 at 17:14 UTC
Jump to comment: Most recent
Comments
Comment #1
merlinofchaos commentedYou could do this with a PHP Code access rule.
You'd write a snippet of PHP which uses time() to get the current time and format_date() (or just date() depending on if you care if the user's timezone is respected) and compare and return true if it's within a range or false if not.
Comment #2
chowdah commentedThanks Merlin, I'll give this a whirl when I get chance. I forgot about the PHP Code rules.
Comment #5
kopeboyCould you provide us with an example on how you did this?
Let's say I have a field_date on the node I am overriding using Panel page "Node template" /node/%node
I want to select a "Past event" variant for the Event node bundle when it's field_date start value is past.