Retrieves the ancestry path of the asset within the CMS Assets Tree starting at the root Assets node and including the file name.
Namespace: Ingeniux.CMSAssembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntaxstring CMSPath(
bool forPublish = false,
string publishingTargetId = ""
)
Function CMSPath (
Optional forPublish As Boolean = false,
Optional publishingTargetId As String = ""
) As String
String^ CMSPath(
bool forPublish = false,
String^ publishingTargetId = L""
)
abstract CMSPath :
?forPublish : bool *
?publishingTargetId : string
(* Defaults:
let _forPublish = defaultArg forPublish false
let _publishingTargetId = defaultArg publishingTargetId ""
*)
-> string Parameters
- forPublish Boolean (Optional)
[Missing <param name="forPublish"/> documentation for "M:Ingeniux.CMS.IAsset.CMSPath(System.Boolean,System.String)"]
- publishingTargetId String (Optional)
[Missing <param name="publishingTargetId"/> documentation for "M:Ingeniux.CMS.IAsset.CMSPath(System.Boolean,System.String)"]
Return Value
StringReturns a slash delimited string of the names of the folders in the ancestry of the content asset including the file name at the end.
Example
Example of CMSPath in custom hook:
if(session.Site.Asset("a/535").CMSPath().contains("views")){
}
See Also