OpenWGA 7.5 - TMLScript reference
Object:
Nav
Description |
Represents a tool object to create WebTML navigator results in TMLScript. This is the pendant of the WebTML tag <tml:navigator> in TMLScript. It however itself does not represent a navigator but only assists in creating NavigatorResults of various navigator types from a reference context. Many methods to create navigator results receive a LookupTable parameter "attributes" which can be used to parametrize the created result. It uses the names of <tml:navigator>-Attributes as keys and interprets them the same way. So filling it with an entry of key "role" and a value of "none" will disable the filtering for contents that are invisible to navigators. Specifying or omitting an attribute here has generally the same effect as it would have on <tml:navigator>. There are however these exceptions:
Each Nav object has a reference context to which the created navigator results relate, just like the documents used by a <tml:navigator> tag relate to the WebTML context of this tag. |
||||||||||||||||||||||||
Retrieval | WGA.nav() | ||||||||||||||||||||||||
Allowed in script types |
|
||||||||||||||||||||||||
Properties and methods |
|
||||||||||||||||||||||||
Examples |
A simple example, iterating over the contents of a children navigator using a JavaScript iterator: for (cx in Iterator(WGA.nav().children())) { log.info(cx.TITLE); } An example of parametrization, making a sitemap navigator result, which goes down to level 2 and ignores hidden flags on content documents. Note that you can provide attribute values in their native types, like the level being a Number here: var sitemap = WGA.nav().sitemap({role:'none', maxlevel:2}); |