[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bricolage-general
Subject:    Re: A couple of questions
From:       Scott Lanning <lannings () who ! int>
Date:       2007-06-21 8:24:28
Message-ID: Pine.LNX.4.64.0706211014190.5098 () localhost ! localdomain
[Download RAW message or body]

On Wed, 20 Jun 2007, Chauncey Thorn wrote:
> First I create a subelement Page.. and added just a Paragraph to the 
> subelement.
> Made the new subelement a element of my article page...

I assume you mean an article element here, not a page element.

> Modifiy my article template - adding the code below in the <snip>
>
> Got this error:
>
> <error>
> An error occurred while processing your request:
>
> Unable to find template 'page.mc'
>
> Location of the error:
> Article -> Page[8]
>
> Please report this error to your administrator.
> </error>
>
> Do I really need page.mc if I posted the code to my Article templage...

Just make an empty one if you don't want to do anything in it.
Maybe Bricolage should just skip those instead.

> <snip>
> <%perl>;
> # Display all elements except 'prev' and 'next'.
> foreach my $e ($element->get_elements) {
>     next if $e->has_name('prev') || $e->has_name('next');
>     if ($e->has_name('paragraph')) {
>         $m->print('<p>'. $e->get_data . "</p>\n");
>     } else {
>         $burner->display_element($e);

You're looping over all elements, right?
So one of those elements is going to be a Page element,
which is what $burner->display_element is going to display.
(Though I don't understand the location in the error message
"Article -> Page[8]". Why page 8?)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic