Appendix B - Path expressions

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

Many web parts and controls use a Path property that allows you to specify which documents should be displayed. This is the AliasPath property of the document. You can use either an exact path or you can use special characters for specifying multiple selection or relative paths:

 

Leaving the Path value empty

 

In many cases, you can leave the Path value empty. In this case, the Path value is set to the alias path of the currently displayed document.

 

In case of list controls/web parts, such as CMSRepeater/Repeater or CMSDataGrid/Grid, the path is set to <current alias path>/% if the current document is not of the same type as the required document in the ClassNames (document types) property. Otherwise, the path is set to the current alias path, which leads to automatic selection of the current document.

 

Using wildcard characters % and _

 

You can use % as a wildcard character for any number of characters, which allows you to select all documents under specified site section.

 

Examples:

 

/ - only root

/% - all documents

 

/Products - only the Products document.

/Products/% - all documents under the Products document.

 

You can also use _ as a wildcard character for a single character.

 

Examples:

 

/Product_ - selects documents /ProductA, /Product1, etc.

 

Using formatting string to get parts of the path

 

You can also use special expressions that extract parts of the current path, such as this.

 

Examples:

 

/{0}/{1}/% - all documents under the second level of the current path

/{0}/{1}/details - document Details under the second level of the current path

 

Using relative paths

 

You can use relative paths expressions to specify sub-documents or parent documents:

 

Examples:

 

./Product - document Product under the current path

../Product - document Product under the parent document of the current path

. - current path

.. - parent document of the current path

./% - all documents under the current path

../% - all documents under the parent document of the current path

 

Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?appendix_b___path_expressions.htm