| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/02/2010 13:49:20
|
os_185
Joined: 08/02/2010 13:30:22
Messages: 3
Offline
|
Hi forum,
I'm pretty helpless right now...
I'm looking for a solution to have different contents on different pages, example:
Page 1:
Header
Some dynamic range
Footer
Page 2-n:
Different Header than Page 1
Same dynamic range
Different Footer
I have absolutley no clue how to set this up.
I tried it to check the value of page-number so that in dependence of the site number the content will change.
But I learned that theres no way to get used to it because page-number is the last point that will be generated before the PDF will be created so theres no choice to use it as possibility.
The document itself got an uncertain amount of pages and only page 1 differs from the other ones.
Somebody have a solution?
I already tried to make a copy of the first template and switch it with another layout via multi-layout manager but this wont work by now.
Maybe theres a possibility in later versions - I'm using v. 1.3.
Hope someone might help.
Thanks,
Olli
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/02/2010 20:59:52
|
Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 53
Offline
|
In latest versions (3.1 and 4.0), you can use regions.
To do this, please use regions, as follows:
1. To your layout, add first and rest regions:
Right click on page -> Insert page -> Region first
Right click on page -> Insert page -> Region rest
Visually, you'll see three pages:
a) your page, with grayed region spaces
b) two new pages, with grayed body space.
With mouse, you can drag wires displaying regions, to extend it as you need.
Now, you need to move all region specific elements into newly added pages, at non-grayed space (including headers and footers), and arrange as you need.
That's all - you made custom headers and footers for first page and for other pages.
In the same way you can manage even/odd regions too.
In the ancient version 1.3, the idea is the same but it is much complex to do; here you need multi-layout manager, as follows:
0. Make new clean layout and attach correct XML to it. We'll not do anything with pages; it is just main holder for regions we'll use. Name it foo_main.lay.
1. Update your layout: it should contain the page flow you need to fill with data, without headers and footers. Name it foo_body.lay
2. Make new layout, and place all headers and footers related to first page. Name it foo_first.lay
3. Make new layout, and place all headers and footers related to other pages. Name it foo_rest.lay
Important: be sure all your layouts uses the same XML!
Now, open again layout foo_main, and follow to Multi-Layout Manager.
Here, with drag and drop from right top list box, add all your other layouts (foo_body, foo_first and foo_last) into left top list box. Do not add foo_main itself here!
Now we almost there. But we need to combine layouts in dialog.
So, check the expression is '1', and specify for all layouts the same group name (at left top list, select layout and fill form data below lists, for each from list). But please keep check boxes at the bottom unchecked. This trick informs XSLfast all 3 layouts are related to one group (flow). And now you can choose check boxes at the bottom of form, as follows:
1. Select foo_body. Check box is [x] body
2. Select foo_first. Selections are [x] even/odd/first/rest, in radio group (x) first/rest, in combo box - first
3. Select foo_first. Selections are [x] even/odd/first/rest, in radio group (x) first/rest, in combo box - rest
Now you can generate PDF.
Note for ancient version 1.3: multi-layouts are supported only from multi-layout manager. So, if you'll use usual PDF generation in XSLfast 1.3, you'll get blank page. For versions 3.0 and above, you need to use one unified way to generate PDF files / Export XSL / XSL-FO: generate button at tool bar / menu point.
|
Best regards,
Victor Krapivin |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 09/02/2010 07:18:18
|
os_185
Joined: 08/02/2010 13:30:22
Messages: 3
Offline
|
Yikes!
That did the trick!
You really helped me out with that - thank you
But now my next problem is at hand:
How can I export this newly created document as an .xsl file?
This message was edited 1 time. Last update was at 09/02/2010 07:23:33
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 09/02/2010 20:17:23
|
Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 53
Offline
|
For version 1.3 and multi-layout - you have only one way, sorry.
You need to follow layout preferences dialog (Layout/Layout preferences menu), and specify XSL file to be used directly in dialog.
Once you did this, open Multi-Layout Manager again, and generate PDF. The XSL (and XSL-FO) file will be generated at place you specified.
For modern versions (3.1 and 4.0) please use File -> Export menu as usual.
|
Best regards,
Victor Krapivin |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 10/02/2010 09:27:05
|
os_185
Joined: 08/02/2010 13:30:22
Messages: 3
Offline
|
Wow...
I'm fully satisfied
Thank you, very, very much.
|
|
|
 |
|
|
|
|