I have an admin plugin which includes a hyperlink control. I am setting the URL from a PageData object but when the page loads the URL always points to the root. Below is the code I am using.
var pageRef = new PageReference((dto.PageID));
var page = DataFactory.Instance.GetPage(pageRef);
hlTarget.NavigateUrl = page.LinkURL;
When I debug the above code page.LinkURL has a valid value, i.e. "/Templates/Public/Pages/OurTemplate.aspx?id=1234&epslanguage=en" but after the page loads the hyperlink points to the site root.
Any ideas why?
FYI, other URL values work just fine. i.e. if I set NavigateURL to an external website or even to a "non-CMS" page on our site using a relative URL it works just fine. It is only URL's in the form provided by LinkURL that get rewritten/wiped out. Is there something in the admin plugin that tries to rewrite page URL's? Any ideas why it would be failing?