Forum How do I...?

Duplicate a page for column overflow

austin
Say I have a brochure with the front page a nice cover etc etc... The interior page(s) have data which is separated into columns, and the last page, is a generic chunk of text.

I want to continuously use Page / template 2 for any data in CSS columns that overflow. Currently if I just have a bunch of data it will separate into columns spanning past the width of the page, or be contained in a box with a scroll.

Is there an easy way to reuse pages? Or would I have to implement some character count and loop through that page/template based on that?

Hope this makes sense, seems like a bit of an edge-case. The issue is that I'm pulling multiple sources of data and some sources are longer than the other.
mikeday
I'm not sure I understand the situation here, as Prince doesn't ever put things in a box with scroll bars, so if you are using multi-column layout it should just flow on to the next page as you would expect. Do you have a sample document?
austin
@mikeday, thank you for the response and I have uploaded the html file.

You will see that at the Itinerary section (page 2) the columns overflow into the next page. I would ideally like the itinerary page to duplicate for any excess data in the columns page.

The only ways I can think about doing this is by either restricting the amount of days within that itinerary page and loop through days 1-8, create a second itinerary page and add days 9-length to that. Or by using some jquery hackery and creating elements on the fly.

Thanks for any insight.
  1. template-a.html43.3 kB
mikeday
Or just don't specify a height on the itinerary page block, and allow Prince to flow it over as many pages as necessary?
austin
that does work, however, I need to have the Itinerary header duplicate for the following pages, except the last one, but I already have a header defined.

Attached is the updated html/css
  1. template-a.html44.7 kB
mikeday
You could put the content in a table and put the heading in a repeating <thead> element, which is a little messy but should work. At the moment there are not many ways to have repeating page templates.
austin
Awesome! Wasn't really anticipating that to work, but it surely did.

Thanks so much!