Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

Burn to an output channel not currently assigned to a story?

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


chris.schults at pccsea

Jul 16, 2009, 2:14 PM

Post #1 of 4 (927 views)
Permalink
Burn to an output channel not currently assigned to a story?

Is one suppose to be able to use $burner->burn_one() to burn to an
output channel not currently assigned to a story?

If so, what is wrong with my code?

<%cleanup>
my $oc = Bric::Biz::OutputChannel->lookup({ id => 1031 }); # OC = Web2
my $cat = $story->get_primary_category();
$burner->burn_one($story, $oc, $cat);
</%cleanup>

When I preview a story, Apache maxes out the CPU and doesn't apparently
do anything, so I stop/start Bricolage. Am I causing an infinite loop???

Chris

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

Chris Schults
Web Developer
PCC Natural Markets
206-547-1222 x104
chris.schults [at] pccsea
http://www.pccnaturalmarkets.com

Sign up for PCC Fresh, a monthly newsletter filled with seasonal
recipes, exciting new products, and more:
http://www.pccnaturalmarkets.com/enews


david at kineticode

Jul 16, 2009, 11:26 PM

Post #2 of 4 (861 views)
Permalink
Re: Burn to an output channel not currently assigned to a story? [In reply to]

On Jul 16, 2009, at 2:14 PM, Schults, Chris wrote:

> Is one suppose to be able to use $burner->burn_one() to burn to an
> output channel not currently assigned to a story?

No.

> If so, what is wrong with my code?
>
> <%cleanup>
> my $oc = Bric::Biz::OutputChannel->lookup({ id => 1031 }); # OC = Web2
> my $cat = $story->get_primary_category();
> $burner->burn_one($story, $oc, $cat);
> </%cleanup>
>
> When I preview a story, Apache maxes out the CPU and doesn't
> apparently
> do anything, so I stop/start Bricolage. Am I causing an infinite
> loop???

Dunno. What is it you're trying to do? Why isn't the OC associated
with the story?

David


chris.schults at pccsea

Jul 17, 2009, 9:32 AM

Post #3 of 4 (855 views)
Permalink
RE: Burn to an output channel not currently assigned to a story? [In reply to]

> > If so, what is wrong with my code?
> >
> > <%cleanup>
> > my $oc = Bric::Biz::OutputChannel->lookup({ id => 1031 }); # OC =
Web2
> > my $cat = $story->get_primary_category();
> > $burner->burn_one($story, $oc, $cat);
> > </%cleanup>
> >
> > When I preview a story, Apache maxes out the CPU and doesn't
> > apparently
> > do anything, so I stop/start Bricolage. Am I causing an infinite
> > loop???
>
> Dunno. What is it you're trying to do? Why isn't the OC associated
> with the story?

For the redesign, I've decided to create a new output channel. I was
wondering if I could skip the step of adding this new output channel to
target stories and simply have the current template burn another copy
using the new output channel. Since this doesn't seem possible, I'll
programmatically add the new output channel.

With that said, is the following possible:

1) User wants to preview a story assigned to two output channels: Web
and Web2
2) The user selects to preview using output channel "Web"
3) Can the template for Web force a preview for Web2 as well? Is this
what $burner->burn_once is for?

Thanks,

Chris


david at kineticode

Jul 17, 2009, 12:01 PM

Post #4 of 4 (860 views)
Permalink
Re: Burn to an output channel not currently assigned to a story? [In reply to]

On Jul 17, 2009, at 9:32 AM, Schults, Chris wrote:

> For the redesign, I've decided to create a new output channel. I was
> wondering if I could skip the step of adding this new output channel
> to
> target stories and simply have the current template burn another copy
> using the new output channel. Since this doesn't seem possible, I'll
> programmatically add the new output channel.

I don't think you want to do that, frankly.

> With that said, is the following possible:
>
> 1) User wants to preview a story assigned to two output channels: Web
> and Web2
> 2) The user selects to preview using output channel "Web"
> 3) Can the template for Web force a preview for Web2 as well? Is this
> what $burner->burn_once is for?

No. I mean, there are ways to do these things, but it's not clear to
me what you're trying to achieve.

I also used a new OC when doing the development for The Tyee's new
site. There, I edited the element types I was interested in, added the
new OC as a non-enabled OC, then cloned a story and added the new OC
to the clone. Then I was able to use the clone to do my development
while not getting in the way of folks who were doing day-to-day work
and did not need or want the new OC to affect their stories.

Best,

David

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.