|
|
Question about portlet_events / "Bill Fergus" <bill@oai-usa.com>
Question about portlet_events
"Bill Fergus" <bill(at)oai-usa.com> |
2005-04-16 20:58:27 |
[
FULL ]
|
I have noticed that a given event is removed from the "Upcoming Events"
portlet when the day comes that the event is scheduled for. I'd prefer
that the event disappear at midnight of the day following the day of the
event. This way if someone comes to my site on the day of an event to
verify that it is going on, the event shows up.
Any ideas about how to do this? I'm thinking I will need to modify the
porlet_events template, but have not yet found where to make the change.
Thanks!
Bill
|
| Attachments: | |
| text.html |
text/html |
- 2377 Bytes |
|
Re: [ZPUGDC] Question about portlet_events / David Diskin <david.diskin@verizon.net>
Re: [ZPUGDC] Question about portlet_events
David Diskin <david.diskin(at)verizon.net> |
2005-04-16 22:13:36 |
[
FULL ]
|
bill -
i believe the following snippet is the key code from portlet_events:
<div metal:define-macro="portlet"
tal:define="results python:here.portal_catalog.searchResults(
portal_type='Event',
end={'query': here.ZopeTime(),
'range': 'min'},
sort_on='start',
review_state='published')[:5];"
tal:condition="results">
i think that this is grabbing all published events which have an end
date/time later than the current date/time. this seems like the
desired behavior to me. e.g. if you have an event that ends on 4/17 at
1:00 p.m., once it's 4/17, 1:01 pm, the event is no longer upcoming.
but, i'm a newbie at this myself, so maybe the more experienced ploners
can weigh in here.
david
On Apr 16, 2005, at 10:13 PM, Bill Fergus wrote:
[...]
David Diskin, david.diskin(at)verizon.net
|
|
|
Re: [ZPUGDC] Question about portlet_events / Joel Burton <joel@joelburton.com>
Re: [ZPUGDC] Question about portlet_events
Joel Burton <joel(at)joelburton.com> |
2005-04-17 00:31:01 |
[
FULL ]
|
On Saturday 16 April 2005 11:28 pm, David Diskin wrote:[...]
so, "here.ZopeTime()" is the current date/time. If you want to look for
all events that started at any point yesterday, you could look for events
with a start <= "tomorrow, at mindnight", which is:
here.ZopeTime().earliestTime() + 1
(that's today-at-midnight, plus 1 day)
Change the "query:here.ZopeTime()" to "query:
here.ZopeTime().earliestTime() + 1" to get the results you want.
You can find the full API of the DateTime object in Zope/Plone in the Zope
Book or in the online help for Zope (the "Help!" link in the ZMI).
HTH,
- j.
[...]
|
RE: [ZPUGDC] Question about portlet_events / "Bill Fergus" <bill@oai-usa.com>
RE: [ZPUGDC] Question about portlet_events
"Bill Fergus" <bill(at)oai-usa.com> |
2005-04-17 01:05:17 |
[
FULL ]
|
Thanks both David and Joel, that helps!
-----Original Message-----
From: Joel Burton [mailto:joel(at)joelburton.com]
Sent: Sunday, April 17, 2005 1:46 AM
To: zpugdc(at)lists.zpugdc.org
Subject: Re: [ZPUGDC] Question about portlet_events
On Saturday 16 April 2005 11:28 pm, David Diskin wrote:[...]
at[...]
ploners[...]
so, "here.ZopeTime()" is the current date/time. If you want to look for
all events that started at any point yesterday, you could look for
events
with a start <= "tomorrow, at mindnight", which is:
here.ZopeTime().earliestTime() + 1
(that's today-at-midnight, plus 1 day)
Change the "query:here.ZopeTime()" to "query:
here.ZopeTime().earliestTime() + 1" to get the results you want.
You can find the full API of the DateTime object in Zope/Plone in the
Zope
Book or in the online help for Zope (the "Help!" link in the ZMI).
HTH,
- j.
|
|