Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Would like to know the same thing.
I want to be able to edit the Link Text that is being rendered (in some cases it needs to be different from PageName).
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;
}
}
}