List Info

Thread: Perllib for dates




Perllib for dates
user name
2006-10-02 19:15:52
>I think that what you're missing is that Bricolage is
not a content  
>server. It's a back-office document management and
publishing system.  
>It does not serve Web sites. After a story (which, after
your  
>changes, might have a calendar subelement) makes its way
through  
>workflow, it gets published, which means that it is
pushed through  
>formatting templates, one or more files written to disk,
and then  
>those files are distributed to one or more content
servers. The nice  
>thing about this is that, for example, a calendar story
might be  
>pushed through HTML templates to create an HTML-based
calendar, *and*  
>through ICS templates, to create an ICal file. These
files can then  
>be served statically by your content server. When
someone makes a  
>change to an existing story and republishes it, those
static files  
>are updated on the content server(s) only the once.

Yeah, I'm on board with that.  At the heart of my question
is how to
tell the system that a calendar (a story) needs to be
regenerated
because some associated content has changed.  Let me clear
up what I
mean by calendar...  We have a web page on nga.gov that is a
calendar of
events. The calendar is a Bric story itself.  Each event
displayed on
the calendar is also a story.  

The calendar of events template must read the schedules of
all events
associated with it, scanning only for events that have an
occurrence in
say... the month of October 2006.  So, if a new event like a
film story
is added to the system and associated with the calendar of
events, the
calendar needs to be regenerated if the film appears in
October.




Perllib for dates
user name
2006-10-03 00:01:21
On Oct 2, 2006, at 12:15, Beaudet, David P. wrote:

> Yeah, I'm on board with that.  At the heart of my
question is how to
> tell the system that a calendar (a story) needs to be
regenerated
> because some associated content has changed.  Let me
clear up what I
> mean by calendar...  We have a web page on nga.gov that
is a  
> calendar of
> events. The calendar is a Bric story itself.  Each
event displayed on
> the calendar is also a story.
>
> The calendar of events template must read the schedules
of all events
> associated with it, scanning only for events that have
an  
> occurrence in
> say... the month of October 2006.  So, if a new event
like a film  
> story
> is added to the system and associated with the calendar
of events, the
> calendar needs to be regenerated if the film appears in
October.

The template for the event should republish the calendar
using  
publish_another(). Something like this:

<%cleanup>;
return unless $burner->get_mode == PREVIEW_MODE;
$burner->publish_another($_) for
Bric::Biz::Asset::Business::Story- 
 >list({
     element_key_name  => 'calendar',
     primary_uri       => '/uri/to/calendar/',
     published_version => 1,
     unexpired         => 1,
});
</%cleanup>

Best,

David
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )