Mailing List Archive

multi page cover
Hi,

I want to write a multi page cover page (index) but I need to
dynamically compute number of pages and add them to $elements.
But it goes into infinite loop (of course).

Any hints how to make display_pages() make as many pages as needed?

Regards, Zdravko
Re: multi page cover [ In reply to ]
On 2010-08-18, at 3:34 AM, Zdravko Balorda wrote:

>
> Hi,
>
> I want to write a multi page cover page (index) but I need to
> dynamically compute number of pages and add them to $elements.
> But it goes into infinite loop (of course).
>
> Any hints how to make display_pages() make as many pages as needed?
>
> Regards, Zdravko

Have a look at this template:
http://gist.github.com/535031

I think it might answer your question, or give you some directions to explore.

--
Phillip Smith // Simplifier of Technology // COMMUNITY BANDWIDTH
www.communitybandwidth.ca // www.phillipadsmith.com
Re: multi page cover [ In reply to ]
Phillip Smith wrote:
> On 2010-08-18, at 3:34 AM, Zdravko Balorda wrote:
>
>> Hi,
>>
>> I want to write a multi page cover page (index) but I need to
>> dynamically compute number of pages and add them to $elements.
>> But it goes into infinite loop (of course).
>>
>> Any hints how to make display_pages() make as many pages as needed?
>>
>> Regards, Zdravko
>
> Have a look at this template:
> http://gist.github.com/535031
>
> I think it might answer your question, or give you some directions to explore.
>

Hi, Phillip!

say I count I need 5 pages. Then if I somehow create a 'page' element $page, adding
it to a $story
$story->add_element($page)
and then
$burner->display_pages('page')
and up in an infinite loop, because every time a page is burned another 5 pages
are also added to the $story... I can't figure out how to solve this.

Zdravko
Re: multi page cover [ In reply to ]
On 2010-08-23, at 10:04 PM, Zdravko Balorda wrote:

> Phillip Smith wrote:
>> On 2010-08-18, at 3:34 AM, Zdravko Balorda wrote:
>>> Hi,
>>>
>>> I want to write a multi page cover page (index) but I need to
>>> dynamically compute number of pages and add them to $elements.
>>> But it goes into infinite loop (of course).
>>>
>>> Any hints how to make display_pages() make as many pages as needed?
>>>
>>> Regards, Zdravko
>> Have a look at this template:
>> http://gist.github.com/535031
>> I think it might answer your question, or give you some directions to explore.
>
> Hi, Phillip!
>
> say I count I need 5 pages. Then if I somehow create a 'page' element $page, adding
> it to a $story
> $story->add_element($page)
> and then
> $burner->display_pages('page')
> and up in an infinite loop, because every time a page is burned another 5 pages
> are also added to the $story... I can't figure out how to solve this.

Hi Zdravko,

My apologies for the slow response. Have you found a solution to the problem yet? If not, I can certainly try to post some example code.

Phillip.


--
Phillip Smith // Simplifier of Technology // COMMUNITY BANDWIDTH
www.communitybandwidth.ca // www.phillipadsmith.com
Re: multi page cover [ In reply to ]
Hi Philip,
I' looked at your code but there is a bug in line 62.


pop @stories

may cause you loose the last story in some cases

Krzysztof


>
> My apologies for the slow response. Have you found a solution to the problem yet? If not, I can certainly try to post some example code.
>
> Phillip.
>
>
> --
> Phillip Smith   //   Simplifier of Technology   //   COMMUNITY BANDWIDTH
> www.communitybandwidth.ca   //   www.phillipadsmith.com
>
>
>
>
>
>
>
>
Re: multi page cover [ In reply to ]
Hi, Phillip!

No, I haven't find solution yet. This recursion is a killer. For cover
pages I insist users add to a story as many page elements as needed, but
it's not a solution. How to stop $burner->display_pages() from recursively
displaying pages forever?

Regards, Zdravko


Phillip Smith wrote:
> On 2010-08-23, at 10:04 PM, Zdravko Balorda wrote:
>
>> Phillip Smith wrote:
>>> On 2010-08-18, at 3:34 AM, Zdravko Balorda wrote:
>>>> Hi,
>>>>
>>>> I want to write a multi page cover page (index) but I need to
>>>> dynamically compute number of pages and add them to $elements.
>>>> But it goes into infinite loop (of course).
>>>>
>>>> Any hints how to make display_pages() make as many pages as needed?
>>>>
>>>> Regards, Zdravko
>>> Have a look at this template:
>>> http://gist.github.com/535031
>>> I think it might answer your question, or give you some directions to explore.
>> Hi, Phillip!
>>
>> say I count I need 5 pages. Then if I somehow create a 'page' element $page, adding
>> it to a $story
>> $story->add_element($page)
>> and then
>> $burner->display_pages('page')
>> and up in an infinite loop, because every time a page is burned another 5 pages
>> are also added to the $story... I can't figure out how to solve this.
>
> Hi Zdravko,
>
> My apologies for the slow response. Have you found a solution to the problem yet? If not, I can certainly try to post some example code.
>
> Phillip.
>
>
> --
> Phillip Smith // Simplifier of Technology // COMMUNITY BANDWIDTH
> www.communitybandwidth.ca // www.phillipadsmith.com
>