List Info

Thread: Triggered republishing and cover date changes




Triggered republishing and cover date changes
user name
2008-03-20 13:21:22
Right now, I have a story type Index that lists all stories
of type
Article for a given month. Thus, when an Article gets
previewed or
published, the corresponding Index gets automatically
re-previewed/republished to reflect any changes.

However, I've realized that if the cover date month or year
of an
article changes, my template only updates the new index and
not the old
one.

Here's the scenario:

1) Create/edit Article with cover date of March 2008
2) Preview Article (/cat/0803/slug.html)
3) Index with cover date of March 2008 gets re-previewed
(/cat/0803/index.html)
4) Change cover date of Article to April 2007
5) Preview Article (/cat/0704/slug.html)
6) Index with cover date of April 2007 gets re-previewed
(/cat/0704/index.html), and the Index for March 2008 is now
incorrect

I imagine this is a common problem and (hopefully) there is
an easy
solution???

Chris

--------------------------------

Chris Schults
Web Developer
PCC Natural Markets
206-547-1222 x104
chris.schultspccsea.com
http://www.pccnatura
lmarkets.com 



RE: Triggered republishing and cover date changes
user name
2008-03-20 13:27:41
>I imagine this is a common problem and (hopefully) there
is an easy
>solution???

You could probably lookup the previously published version
of your
article (if there is one) and then find the corresponding
index page to
re-publish.


RE: Triggered republishing and cover date changes
user name
2008-03-20 13:46:28
> You could probably lookup the previously published
version of your
> article (if there is one) and then find the
corresponding index page
to
> re-publish.

Thanks David, that's what I figured. I would use the key
'published_version', right?

But this doesn't help with previews and my preview site when
changes to
the cover date occur prior to publishing. Looking at the
other options,
I think I could check the previous version using the
'version' key. If
the cover dates of the current and previous versions don't
match, update
the Indexes for both.

However, if the cover date change occurs during a single
version, I
think I'm out of luck as far as the preview site goes, which
is
acceptable and my users will have to manually republish.

Chris


Re: Triggered republishing and cover date changes
user name
2008-03-21 14:23:55
On Mar 20, 2008, at 11:46, Schults, Chris wrote:

>> You could probably lookup the previously published
version of your
>> article (if there is one) and then find the
corresponding index page
> to
>> re-publish.

This is what we've done for customers.

> Thanks David, that's what I figured. I would use the
key
> 'published_version', right?
>
> But this doesn't help with previews and my preview site
when changes  
> to
> the cover date occur prior to publishing. Looking at
the other  
> options,
> I think I could check the previous version using the
'version' key. If
> the cover dates of the current and previous versions
don't match,  
> update
> the Indexes for both.
>
> However, if the cover date change occurs during a
single version, I
> think I'm out of luck as far as the preview site goes,
which is
> acceptable and my users will have to manually
republish.

For one of our customers, we set up previews to *always*
trigger  
`publish_another()` on such related index pages, so that
they're  
always right. This can make previews, slow, though, so I
don't  
recommend it.

Otherwise I agree with what David has said.

Best,

David


[1-4]

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