Step 8: Edit Page Layouts

If you have a project template that includes PDF output, the steps for creating a preview are a little more involved. The reason for this is that the Page Layout Editor does not allow you to select CSS variables in the fields.

If you have a template with PDF output, you’ll need to make some changes to your page layout(s) using the Internal Text Editor. These changes will include references to styles that you create in your regular stylesheet. By observing the page layouts and stylesheets in Flare Desktop's factory project templates that include PDF output (e.g., Side Navigation and PDF, Top Navigation and PDF), you can leverage the information for your own custom template.

Example If you create a test project based on Flare's Side Navigation and PDF template, you will notice that the preview for the PDF title page looks like this:

Various sections of the related page layout (in this case, Frontmatter.flgpl) can be customized by selecting color, font, and image CSS variables.

When you open the Frontmatter page layout file in the Internal Text Editor, you will see the following markup. To integrate CSS variables with the page layout, the sections with the <Content> tags (highlighted in yellow) were added inside the frames, with references to style classes. A normal page layout would not have these sections.

If you then open the Styles.css file in the Internal Text Editor, you will notice these generic style classes, which contain references to different branding CSS variables.

Using this method, you can ensure that your page layout elements can be updated easily via CSS variables.

Note If you want to use different style classes those provided by the factory templates and mentioned in the example above, you would add them to the markup of the page layout file. Also, make sure those classes are added to your stylesheet, and provide properties and values to specify how you want that part of the page layout to look.

Note When customizing portions of a page layout in this way, make sure you are working within a section where the "Flow" is a header, footer, or decoration. Do not make changes in a section where the Flow is body.

Note If you want to set a background color or image on a div, you should set the height for the frame in both the Page Layout Editor, as well as the height for the div in your stylesheet. Otherwise, the div will "collapse" and you won't get the results you want.