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/webparts, such as CMSRepater/Document repeater or CMSDataGrid/Document datalist, 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/devguide/index.html?appendix_b___path_expressions.htm