Conditions in page layout
-
Mette Nyberg
- Propeller Head
- Posts: 61
- Joined: Wed Jan 09, 2008 8:19 am
- Location: Copenhagen, Denmark
Conditions in page layout
It doesn't seem to be possible to add conditions to page layout? Have anyone tried this? I have a two-product project and want to show different images in the page layout. But because it apparently is not possible to have conditions in page layout I will need to have two TOCs rather than one. Where is the single sourcing principle in this...
Mette
Re: Conditions in page layout
You might want to try creating a snippet that contains both images. Within the snippet, you can set condition tags. Then, place the snippet in the page layout.
I haven't tested this, myself, but in theory it should work. Good luck.
I haven't tested this, myself, but in theory it should work. Good luck.
Judy Hennessey


Re: Conditions in page layout
You can do it, but you have to apply the conditions to the content of the frame, not to the frame itself.
- Open the page layout and insert an image frame.
- Select an image (this is only temporary; you'll change it later).
- When the frame appears with the image in it, press F2 to edit the contents. Click No when it asks if you want to use a content template.
- The Frame Contents pane will open along the bottom. Insert your two images or snippet or whatever and apply condition tags as necessary.
- Save the page layout.
- Re-select the frame, if necessary, then right-click on it and select Properties from the popup menu that appears.
- Go to the Background tab and remove the reference to the image file that you selected in step 2. Click OK to close that screen; you should see your image frame with two images in it.
- Make sure your target is set to include/exclude the appropriate condition types, then build the output. You should only see the image that is supposed to be included in that output type.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
ClanMoffat
- Propeller Head
- Posts: 17
- Joined: Thu Jun 22, 2023 2:34 am
Re: Conditions in page layout
I have tried to make use of conditions in Page Layouts to overcome issues between PDF and WORD output...
For example, I have come across:
As regards the image, I tried using an SVG for PDF and a PVG for WORD referenced in the same Page Layout, controlled using conditions, however MadCap still complained about the SVG, even though it was not going to be used...
It looks as though the Page Layout files are initially "checked" without consideration for conditions, and then used in the generation of the document.
So I get warnings and errors, but the document appears OK (most of the time)...
I run MadCap from a Batch script, and import the PageLayout files from another Top Level Project.
To avoid the errors and warnings, I am thinking about clearing the Page Layout folder and only importing the page layout files (Word or PDF) that I need for the current document....
Not ideal, but this should rule out the errors...
Good luck!
For example, I have come across:
- SVG images that are happy in the PDF header, but result in errors with the WORD output
- Rotated Frames for a Watermark which are OK in the PDF, but generate errors/warnings in the WORD output
As regards the image, I tried using an SVG for PDF and a PVG for WORD referenced in the same Page Layout, controlled using conditions, however MadCap still complained about the SVG, even though it was not going to be used...
It looks as though the Page Layout files are initially "checked" without consideration for conditions, and then used in the generation of the document.
So I get warnings and errors, but the document appears OK (most of the time)...
I run MadCap from a Batch script, and import the PageLayout files from another Top Level Project.
To avoid the errors and warnings, I am thinking about clearing the Page Layout folder and only importing the page layout files (Word or PDF) that I need for the current document....
Not ideal, but this should rule out the errors...
Good luck!