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

Mailing List Archive: Bricolage: users

burn_again and paged story question

 

 

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


rs at plusw

Nov 10, 2010, 1:49 PM

Post #1 of 2 (423 views)
Permalink
burn_again and paged story question

Hi,

when I have a story with a "paged" subelement, how can I get how many of them there are in total ( for instance to display a "page n of N" info).
I could find anything here.

Another question to set_burn_again:
As far as I understand this function, i could split a list of N "whatever" to be displayed in chunks of n whatever on several pages.
Is there a way where I can get the "counter", which page i'm currently burning or do I have to store in in burner->notes and increment it myself ?


Rolf


bret at pectopah

Nov 10, 2010, 2:14 PM

Post #2 of 2 (407 views)
Permalink
Re: burn_again and paged story question [In reply to]

Hi Rolf,


> when I have a story with a "paged" subelement, how can I get how many of them there are in total ( for instance to display a "page n of N" info).
> I could find anything here.

If each page is a subelement, you can just check the size of the array returned by $element->get_containers($page_element_key_name).

So:

my $pagecount = scalar($element->get_containers($page_element_key_name));

> Another question to set_burn_again:
> As far as I understand this function, i could split a list of N "whatever" to be displayed in chunks of n whatever on several pages.
> Is there a way where I can get the "counter", which page i'm currently burning or do I have to store in in burner->notes and increment it myself ?

The value returned by $burner->get_page() is the number of the current
page minus one. So it's false on page 1, and a positive integer for all
other pages


Hope this helps,

Bret


>
> Rolf
>
>
>
>
>
>
>

--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret [at] pectopah
www.pectopah.com

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.