- Paligo-Dokumentation
- Wiederverwendung
- Filterung/Profiling
- scoped-Filterung
scoped-Filterung
[en] Scoped filtering is a special type of filtering that's designed for this scenario:
-
[en] You reuse the same topic in multiple places in your publication
-
[en] You want each instance of the topic to be filtered differently, depending on its position in the publication.
[en] For example, you might have an "installation" topic that appears in a "Windows" section of your publication and also in a "macOS" section. You want to filter out macOS content when the topic appears in the "Windows" section, and then filter out "Windows" content when the topic appears in the "macOS" section. To make this possible, you need scoped filtering.
[en] Scoped filtering works by using the hierarchical structure of your content to define which filters to apply. You position the topic you want to use in several places so that it is always a child of another topic. Paligo uses the filters applied to the parent topic to determine which filters to apply to the child.
[en] To use scoped filtering:
scoped-Filterung aktivieren
In der Layout-Editor ist es möglich, scoped-Filterung sowohl für HTML5- als auch für die PDF-Ausgabe zu aktivieren. Stellen Sie sicher, dass die Option auf Ja oder Standard eingestellt ist.
Anmerkung
Für die PDF-Ausgabe finden Sie diese Einstellung unter Allgemein/Filterung und Taxonomien/scoped-Profiling/-Filterung aktivieren.
Anmerkung
[en] For PDF Layouts, the option is in a different location:
-
Wählen Sie auf der Seitenleiste Allgemein aus.
-
[en] Select Filtering and taxonomies.
-
[en] Look for the Enable scoped profiling/filtering setting.
-
Wählen Sie im oberen Menü Layout aus.
-
Wählen Sie das Layout, das Sie aktualisieren möchten, oder Ein Layout erstellen aus.
Tipp
Sie können die URL des Layout-Editors kopieren und in eine neue Registerkarte in Ihrem Browser einfügen. Dies kann nützlich sein, wenn Sie häufig zwischen Ihren Paligo-Inhalten und den Layout-Einstellungen wechseln.
-
Wählen Sie auf der Seitenleiste Klassen und Attribute aus.
-
Wählen Sie Ja, um scoped-Profiling/-Filtering zu aktivieren.
-
[en] Yes to turn scoped filtering on.
-
[en] No to turn scoped filtering off.
-
Standard – um den Wert für diese Einstellung aus dem Basislayout zu übernehmen. Das Basislayout kann ein von Paligo bereitgestelltes integriertes Layout oder ein anderes kundenspezifisches Layout ein. Weitere Informationen finden Sie unter Layoutbeziehungen – Basis, Neu, Duplizieren.
-
-
Drücken Sie Speichern.
[en] Set Up Scoped Filtering
[en] To set up scoped filtering, you need to create a publication your content arranged as parent topics and child topics. The topic you want to reuse in different places has to be a child topic. For example, in the following publication, the same "Specifications" topic is reused three times. In each case, it appears as a child of a different parent topic. You will then need to apply your choice of filter attributes and filter values to the parent topics as well as the child topic.
[en] To show you how this is set up, we will give you step-by-step instructions. It is easier to follow with an example, so we will include one that filters based on the operating system being macOS or Windows.
Anmerkung
[en] The instructions use filter attributes and filter values set in the Element attributes panel in each topic. But if you prefer, you could set up taxonomy filters for filters at the topic-level. You would need a taxonomy tag to represent the filter attribute (type) and child taxonomy tags to represent the filter values. For details on using taxonomy tags for filtering, see Taxonomie-Filter.
[en] We assume that you already know how to create and organize publications and topics. You should also have already enabled scoped filtering in your Layout, see scoped-Filterung aktivieren.
-
[en] Topics erstellen that will serve as a parent topic.
[en] For these instructions, we will use two example parent topics: "Installing on MacOS" and "Installing on Windows".
-
[en] Create a topic that will serve as a child topic. This is the topic that is going to be reused in more than one place in your publication.
[en] For our example, we will use a child topic named "Operating system".
-
[en] Create a publication and add the parent topic(s) and child topic to it. You can add the child topic many times, but it must always be a child of one of your parent topics.
-
[en] Edit your child topic and apply filter attributes and filter values to the parts you want to filter in or out.
[en] In our example child topic, we have two itemized lists, one for macOS content and one for Windows content. We have applied the
os
filter attribute to theitemizedlist
elements. We have set the filter value tomacOS
orWindows
respectively. -
Drücken Sie Speichern.
-
[en] Open one of your parent topics in the editor. Select its
section
element and use the Element attributes panel to give it:-
[en] The same filter attribute you used on your child topic, for example, os
-
[en] The relevant filter value for that topic.
[en] Select Save when you have done that.
[en] With our example, we give:
-
[en] "Installing on macOS" - its
section
element has theos
filter attribute andmacOS
as the filter value. When we publish, we want Paligo to filter it so that it only includes the content that's relevant for macOS. -
[en] "Installing on Windows" - its
section
element has theos
filter attribute andWindows
as the filter value. When we publish, we want Paligo to filter it so that it only includes the content that's relevant for Windows.
-
-
[en] Repeat the previous step for your other parent topics that have the same reused child topic.
[en] Your parent topics and child topic are now set up to use scoped filtering.
-
[en] Publish your publication and choose your Layout. You must use a Layout that has scoped filtering enabled.
[en] In the publishing settings, use the Profiling attributes section to include:
-
[en] The filter attribute that you gave to your parent topics and the child topic
-
[en] The filter values for all of the versions you want to include.
[en] For our example, this means we choose:
-
[en] Filter attribute:
os
-
[en] Filter values:
macOS
andWindows
.
[en] Note that we include all of the values that are needed for the publication. In this case, the first instance of the operating systems topic uses a macOS value and the second uses a Windows value. So we need to include both values.
Wichtig
[en] The parent-child relationship between topics is important for scoped filtering. When a topic appears in a publication many times, Paligo uses the filter attributes and filter values on the parent topics to figure out which filters to apply to the child topics.
-
[en] The published output should:
-
[en] Show the child topic multiple times in the table of contents
-
[en] Filter the content in the child topic differently, depending on where the child topic appears.