Ok, so this might be a longshot, but: In previous versions we've used the following code to alter the output from pageref-propertys, but now with CMS 5 pageLink always ends up as null, which implies that PropertyPageReference isn'nt compatible with HyperLink. Does somebody know why, and maybe have a suggestion for a workaroud?
protected override void AddedControl(System.Web.UI.Control control, int index) { try { switch(this.InnerProperty.GetType().ToString()) { case "EPiServer.Core.PropertyPageReference" : base.AddedControl(control, index); HyperLink pageLink = control as HyperLink; if(pageLink != null) { //do stuff with pageLink here
Ok, so this might be a longshot, but: In previous versions we've used the following code to alter the output from pageref-propertys, but now with CMS 5 pageLink always ends up as null, which implies that PropertyPageReference isn'nt compatible with HyperLink. Does somebody know why, and maybe have a suggestion for a workaroud?
protected override void AddedControl(System.Web.UI.Control control, int index)
{
try
{
switch(this.InnerProperty.GetType().ToString())
{
case "EPiServer.Core.PropertyPageReference" :
base.AddedControl(control, index);
HyperLink pageLink = control as HyperLink;
if(pageLink != null)
{
//do stuff with pageLink here
}
break;
}
}
}