MACROMEDIA CONTRIBUTE 3-DEPLOYING CONTRIBUTE Guida Utente Pagina 98

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 142
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 97
98
Serena® Collage® 5.1.3
Chapter 3 Design-Time Component Reference
Writing the NavMap Component Body
The NavMap body defines code which you will generate for each node in the site structure,
which can include the following data about each:
The node name
The URL to the node
The node's level in the site structure (1, 2, and so forth)
The number of children nodes that the node has (0, 1, and so forth)
You can then use this data to generate the navigation links to each node, either in the
body of the component itself, or by evaluating a JavaScript function which generates the
links.
The NavMap component repeats the body for every node in the site structure. For
example, if the body is simply set up to display the name of a node, the name of each
node in the structure will display.
The NavMap component body is very flexible. In its simplest form, you can define simple
HTML which Collage will generate for each node in a site structure. However, to take
better advantage of its benefits, you can also use the body of the component to generate
JavaScript methods which can automatically pass information about all nodes in a site
structure to a JavaScript navigation menu. See "NavMap Example: Passing Node Values
into JavaScripts" on page 100 for more information.
Generating Node Level Numbers
To generate the number of the site structure level to which the node belongs, include the
$node.level
data macro field. The
$node.level
returns a number that corresponds to
the level in the structure hierarchy, starting with
0
. You can use this value to define
statements, in your navigation script, which place lower level items further down in your
tree. For example, you may write a statement that places all links for which the
$node.level
value is
1
at the top at the hierarchy, and cascade the remaining items in
the menu based on their level value (
1
,
2
, and so forth).
code
Path in Collage to the
nexusComponents.jar file,
such as
"/System/
Components/
nexusComponents.jar"
The archive where the component class file is stored. By
default, this is stored in:
/
root
/System/Components/
nexusComponents.jar
. You can also set this property to:
code="$nexusComponents"
which will resolve to the
correct path.
sitestructure
Path to the site structure file Defines the absolute path, from the root of the project, to
the site structure file (.site) that Collage will use to
generate the node information when you preview or
deploy the file. For example:
sitestructure="/Website/Website.site"
Property Value Description
Vedere la pagina 97
1 2 ... 93 94 95 96 97 98 99 100 101 102 103 ... 141 142

Commenti su questo manuale

Nessun commento