| Globally Available Macros | |
|---|---|
| #diParse("somefile.vm") | |
| #parseFiContent("somefile.vm") | |
| \#searchUrl() | Returns either $contextPath/search or $contextPath/secureSearch for the action in the search form. |
| \#getBreadCrumbs() | Generates the bread crumb links without the home page link. |
| \#getBreadCrumbs('true') | Generates the bread crumb links with the home page link |
| \#showChildLinks( $selectItem ) |
Generates a tree like structure of this item's children.
Generally called within the conditional, #if($selectItem.getAttribute('showList')=='true')
|
| \#HBX_path() | Talk to Jason Evans. |
| \#sitemap(\$navList) | Talk to Jason Evans. |
| Example: | |
| #diParse("/content/template_header.vm") | Root is diFiles path |
| #parseFiContent("snippet.vm") | Only allows files located under fiFiles\content\{language}\ |
| Variable | Value |
|---|---|
| $fiImages | /home/fiFiles/static/images |
| $fiDocs | /home/fiFiles/static/documents |
| $ficss_folder | /home/fiFiles/static/css |
| $templateimages | /home/diFiles/skins/default/images |
| $js_folder | /home/diFiles/skins/default/js |
| $css_folder | /home/diFiles/skins/default/css |
| $diFiles | 03/03865/wclive/diFiles |
| $fiFiles | 03/03865/wclive/fiFiles |
| $contextPath | /home |
| $baseUrl | |
| $fiFriendlyName | Bank of McCreary County |
| $lang | en |
| Variables for workarea | |
| $editmode | live |
| $editContentLink | https://wcadmin.diginsite.com/wcAdmin/contentEdit/begin.do |
| $showEditLinks | true |
| Navigation | |
| $navItems | [Ljava.lang.Object;@632d274f |
| $selectedNav | [com.diginsite.product.webcenter.web.NavItem@296fe667] |
| $selectItem | com.diginsite.product.webcenter.web.NavItem@296fe667 |
| $contentPage | vhelp.vm |
| Method | Value |
|---|---|
| getChildren() | $selectItem.getChildren() |
| hasChildren() | false |
| getParentUrl() | |
| hasParent() | false |
| getParent() | $selectItem.getParent()
This function should be used in conjunction with
hasParent() but if not, this will return a
completely empty NavItem to prevent errors
in template processing. This, however, will slow down
processing as it will need to populate the empty
NavItem.
Available with 3.1
|
| getTitle(String lang) | Velocity Help |
| getTitle() | Velocity Help |
| getUrl() | /home/vhelp |
| getAttributes() | {} |
| getAttribute(String attribute) | $selectItem.getAttribute("example") |
| getIAttribute(String attribute) | \$selectItem.getIAttribute("example")
Retrieves the inherited attribute. If it cannot find the attribute at the current
level, this will iterate through the parents until there are no more parents
to check. If two ancestors have the same attribute, this method will return
the most immediate ancestor's attribute.
Available with 3.1
|
| isRedirect() | false |
| getRedirectType() | none |
| isSelected() | true |
| getName() | vhelp |
| getTemplate() | vhelp.vm |
| isSecure() | false |
| Tool | Uses |
|---|---|
| $sd | sd.getCustomContent("name") sd.getPrintData("srcFile", "group", "value") |
| $search | search.getSearchFrame("searchWebappURL","serverSpec", "collection", "indexName") |
| \$search.getSearchResults("searchWebappURL","serverSpec", "collection",
"indexName") search.getSearchResults("indexName") |
|
| $tidy | $tidy.clean(contentsToClean) Out with Web Center 3.1 |
| $calc | calc.getKidCalc() calc.getLoanCalc() calc.getLoanCompCalc() calc.getMortCalc() calc.getRetCalc() calc.getSaveCalc() |
| $map | http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html |
| $date | http://jsourcery.com/output/apache/jakarta/velocity/1.4/org/apache/velocity/tools/generic/DateTool.html |
| $browser | http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/view/tools/BrowserSnifferTool.html |
| $cookies | http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/view/tools/CookieTool.html |
| $params | http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/view/tools/ParameterParser.html |
| $math | http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/generic/MathTool.html |
| $number | http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/tools/generic/NumberTool.html |