November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Seems I was pointed in the wrong direction before. Of course you can access the simple address through the propertyname "PageExternalUrl".
Howeve, the url looks like this:
http://localhost/templates/pages/sitemap
instead of:
http://localhost/sitemap
meaning the PageExternalUrl looks for the folder structure and then adds the simple url..
How can you solve this in an appropriate way?
Hi Martin!
I did a quick test and the PageExternalUrl property
string s = page["PageExternalUrl"]
and it returned the expected value, which in your case would be "sitemap".
So all you should need to do is something like the following to get an the complete url:
Configuration.Settings.Instance.SiteUrl.ToString() + page["PageExternalUrl"];
Regards
Per Gunsarfs
Here is a sample code snippet for retrieving the simple address for a page:
Martin, the reason for your inaccurate URL is that the simple address doesn't include a leading slash by default.
I want to get the simple address for a given page. So far, I've come up with the code below, which obviously don't work. Can someone please help me? Thanks!