The "scope filter" is not a type of filter, it is a feature that enables the possibility to apply different filters depending on where the content is reused within a publication.
In other words, it enables the filter applied on a "parent" topic to control the information shown in its child topics. This means that when child topics have parts marked with various filter values, they can be reused several times within the same publication and show different information depending on where the topic is positioned in the publication structure.
To achieve scoped filtering you have to:
-
Add Filter Attributes to both parent topics and child topics. The filter on the parent topic controls what parts to show in reused child topics. It matches values on the same profiling attribute (for example
os="macos, windows"
andos="macos"
).Different values on separate profiling attributes (for example
audience="admin"
andos="macos"
) will be matched separately. Scoped Filtering can be used in combination with Taxonomy Filters. -
Organize your publication with the child topics as subtopics to the parent topics.
Important
If your scoped filtering is not working as expected, review how the Filter Attributes are set on different levels. This feature is activated by default, but it could be deactivated for some reason, see Enable Scoped Filtering.
If you update the child topic with new filter values, you also need to add these values to a parent topic.
Let's say you want to add a browser for Unix in the example above. You can add a list item with the name for example "Lynx" and set the filter attribute to os="unix"
.
In the image above, the two parent topics has either os="macos"
or os="windows"
. That means that this new list item will not show if not added to a new parent topic with os="unix"
(or no filter) to make it show.
Note
If you publish without the Profiling attributes (filter attributes), the child topics will show all their content.
You can enable scoped filtering for HTML5 and PDF output in the Layout Editor.
This feature is enabled by default. However, it can be disabled on your Paligo instance. To verify that this feature is activated, the option must be set to Yes or Default (if activated in the base layout) to work.
Note
For PDF output you find this setting: General / Filtering and taxonomies / Enable scoped profiling / filtering.
The following instruction shows how to enable this setting for HTML5 output:
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Classes and attributes in the sidebar.
-
Select Yes to Enable scoped profiling / filtering.
-
Yes - to activate scoped filtering on your instance.
-
No - to deactivate this feature on your instance.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
Select Save.
The important principles of scoped filtering are:
-
Scoped filtering applies to content that is reused in the same publication.
-
With scoped filtering you can reuse topics and set them to use different filter values, depending on where the topic is positioned in the publication structure.
-
You tell Paligo which filter values a "child" topic should use by setting a "scope filter" on the "parent" topic
-
When you publish, you set the Profiling attributes and include all of the values that you want to use in the publication. Publish your content and include the filter attributes that are set on the "scope filters" and all of the filter values that should be used.
In this image there are two "scope filters" to set (1 and 2).
Note
For scoped filtering to work it must be activated, see Enable Scoped Filtering.
To create parent topics and a child topic with parts profiled with Filter Attributes:
-
Create a Topic that will serve as a "parent" topic.
The parent topics in this example are called "Installing on MacOS" and "Installing on Windows".
-
Select the topic or component in the Content Manager to open it in the Editor.
-
Select the
section
element in the Element Structure Menu. -
Select Go to element.
-
Add the filter attribute and set its value in the Element Attributes Panel.
To learn more, see Filter Attributes.
In this example the filter attribute used for "Installing on Windows" is
os
with the value set towindows
. This tells Paligo that any child topics that contain theos
should include parts marked forwindows
but exclude parts marked with other values. -
Select Save.
-
Repeat the steps 1 to 6 for the next "parent" topic. Set its to a different value.
In this example the
os
value is set tomacos
. This tells Paligo that any child topics that contain theos
should include parts marked formacos
but exclude parts marked with other values. -
Create a Topic that will serve as a "child" topic with parts profiled with Filter Attributes.
In this example the topic "System Requirements", have some information that is unique for Windows, and some that is unique for Mac.
-
Select Save.
-
Add the new topics to your publication. Organize the child topic (2) as subtopics to the parent topics (1).
-
Select Save to confirm the publication changes.
-
Publish Content with the Profiling attributes set with the filter attribute and all its values.
In our example we use
os
and both its values (macos
andwindows
). This tells Paligo that the child topic "System Requirements" will show different content when used in "Installing on MacOs" than when used in "Installing for Windows".
The output will show different content from the child topic. This is controlled by the filter attributes set for the parent topic.
Comments
0 comments
Article is closed for comments.