kentico_jurajo
-
3/11/2011 2:08:29 PM
RE:CMS.CMSHelper.CMSContext.CurrentAliasPath Doesn't Return Correct Path
Hi,
Alias path is not the URL - therefore it is missing the extension. Also, "xyz" is a document in the tree structure or is it a virtual directory/application path?
Alias path returns value from the root of the web site - so if xyz is a virtual directory it is not the document's alias path (since you can move the site under other virtual directory).
If you want to check the URL, you need to compose it from the alias path:
"http://localhost:52419/xyz" + CMS.CMSHelper.CMSContext.CurrentAliasPath + ".aspx".
Or you can use one of the methods from URLHelper class such as GetAbsoluteURL().
Best regards, Juraj Ondrus
|