When you publish Paligo content, you need to use a layout. The layout contains settings that affect how Paligo converts your XML content into the output you want. For example, if you are publishing to an HTML5 help center, you need to use an HTML5 help center layout. Its settings affect how Paligo converts your XML into the HTML pages you see in the finished help center.
For layouts, you can choose to:
-
Use one of the built-in layouts that are provided with Paligo. These cannot be customized, but will create a working publication.
-
Create your own layout, which you can customize to meet your own requirements.
-
Duplicate an existing layout. This creates a copy of a layout, and can save time if you have a layout that has most of, but not all, of the settings you need for your output.
In most cases, you will want to use a custom layout, either a new one, one you created earlier, or a duplicate.
But before you use a layout, it is important to understand the hierarchical relationship between the "base layout" and your custom layout or duplicate layout. Because both custom layouts and duplicate layouts can inherit settings from a base layout, and these can affect the publication that Paligo creates.
A base layout, as the name suggests, is a layout that forms the basis of another layout. It contains the configuration for a certain type of output, such as a PDF or an HTML5 help center.
When you create a new layout, you give the layout a name and choose a base layout. This is where the hierarchical "parent-child" relationship between layouts begins. The base layout defines what:
-
Type of output you can publish with the layout
-
Collection of settings are available in your new layout
-
Default settings will be used for your new layout.
The same principle applies with duplicate layouts. These are copies of existing layouts, and when you create a duplicate, it has the same base layout as the original version.
The main benefit of using a base layout is that you can save considerable time and effort when configuring your publishing settings. You can apply the typical settings in the base layout and these are passed on to the "child" layouts. In each "child" layout, you can then choose whether to use the inherited value for each setting (default value) or override it with a different value.
When you create a new layout, it has to be based on an existing layout (a base layout). This can be either one of the built-in layout types or one of your existing layouts.
The new layout and base layout have a parent-child relationship, where:
-
The new layout inherits the settings of the base layout.
-
In your new layout (the "child"), any setting that is set to Default inherits its value from the base layout. So if you change the matching value in the base layout, the change will also apply to the "child" layout.
-
Any changes that you make in a "child" layout take priority. As soon as you change a setting from Default to another value, that setting will no longer get its value from the base layout.
The following example shows how the relationship between a new layout and its base layout works. But be aware that it is also possible to create complex chains of relationships, as a layout can be a "child" of one layout, but a "parent" to another layout. We recommend that you try to keep your layout relationships as simple as possible, so that they are easier to manage. But if you do create a complex chain of layouts, always bear in mind that a default value is inherited from its base layout.
Note
To learn how to create a new layout and associate it with a base layout, see Create a Layout.
Example 1. New Layout Inherits Settings from the Base Layout
Let's say you have no layouts in your Paligo instance. You want a PDF layout, so you create a new one. When you create a new layout, you give it a name "ACME PDF" and you have to choose a base layout. As you don't have any existing layouts, you choose the Default PDF option, which uses Paligo's built-in PDF layout as the base. You cannot access the default built-in layouts.
Your new "ACME PDF" layout inherits the default settings from the built-in default PDF layout. You can use the new layout as it is, or you can make changes to its settings. All of the settings that show "Default" are inheriting the settings from the base layout.
You decide to edit the "ACME PDF" layout so that its Display language name on sidebar option is set to Enabled.
As soon as you save the layout, the Display language name on sidebar setting uses Enabled. This setting no longer has any relationship with the base layout. It will only be affected by the base layout if you were to set it back to Default.
Now you create another new layout. This time, you name the layout "ALT STYLES PDF" and you set the "ACME PDF" as the base layout.
You edit the "ALT STYLES PDF" layout and see that the Display language name on sidebar setting is set to Default. This means that it is inheriting the value from its closest "parent" base layout. In this case, it is inheriting the value from the "ACME PDF" layout (and so it is actually Enabled as that setting is Enabled in the base layout).
You go back and edit the "ACME PDF" layout and change the Display language name on sidebar to Disabled. This change from Enabled to Disabled applies not only to the "ACME PDF" layout, but also to all of the layouts that are based on it and have Display language name on sidebar to Default. So changing it to Disabled also means "ALT STYLES PDF" inherits Disabled.
You want the "ALT STYLES PDF" to display the language on the sidebar, so you change its Display language name on sidebar to Enabled. At this point, the "ALT STYLES PDF" stops inheriting the value of this particular setting from its base layout. So you have:
-
ACME PDF (base layout) with Display language name on sidebar set to Disabled.
-
ALT STYLES PDF (based on ACME PDF) but Display language name on sidebar is set to Enabled. Display language name on sidebar is not affected by changes to that setting in ACME PDF. Any changes to other settings in ACME PDF will still affect the matching settings in ALT STYLES PDF, but only if they are set to Default in the ALT STYLES PDF.
The ALT STYLES PDF will still inherit changes from the ACME PDF for all settings that are set to Default. It only stops inheriting from ACME PDF where you specifically set the value in ALT STYLES PDF.
A duplicate layout is a copy of an existing layout. It contains all of the same settings as the original version, including the same:
-
Base layout as the original version of the layout
If you make changes to the base layout, those changes will affect your duplicate layout too. This only applies to those settings that are set to Default in your duplicate layout.
-
Settings as the original version of the layout
The settings in your duplicate layout will initially be set to the same as they were in the original version of the layout. But the duplicate is independent and is intended to be a starting point for a different version. Any changes you make in the original do not affect your duplicate.
The idea with duplicate layouts is that you use them when you need a new layout, but already have one that is very similar to what you need. By creating a duplicate of it, you can save time as it already has most of the settings you want. In the duplicate, you can make the changes you want and know that they will not be affected by the original layout's settings.
Tip
To learn how to create a duplicate layout, see Copy a Layout (Duplicate).
Comments
0 comments
Article is closed for comments.