
Select
Components User's Guide
107
</node:last>
<node:last inactive>
<a href="$node.url">
<img src="nav_last_inactive.gif" text="Last"></a>
</node:last>
</nexus:component>
Select
The Select component can display different content based on specific criteria. You can use
the Select component to define variable content based on conditions such as metadata
values, or asset property values (such as filename and asset name). You can even use the
select component to choose between variable versions of other components, such as the
Navigation Bar component.
For example, you can define a select component that will insert different text snippets
depending on the value of a metadata field for the page that contains the component, or
depending on the value of a metadata field for the folder that contains the page, or the
deploy map that was used to publish or preview it. By using such a component on a
master page, you can automatically generate and insert different content snippets on
pages with different metadata values, or which are published using different deploy maps.
In this way, you can even create different deploy maps for different language versions of
a website, and use the select component to determine which language content will be
published with each deploy map.
How the Select Component Works
When you create a Select component, you define alternative content snippets for each of
the potential conditions.
This is useful if, for example, a metadata field called Author is defined for a project, and
you want to automatically insert the author's name onto each page. If there are three
primary authors, you could set up the Select component to do the following:
You can also use the Select component to display alternate content for pages in different
languages.
If the Author metadata
field is set to...
Then the component...
Ken Inserts "Author: Ken" on the page
Sara Inserts "Author: Sara" on the page
Alice Inserts "Author: Alice" on the page
Undefined Inserts "Author: Unknown" on the page
Kommentare zu diesen Handbüchern