Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > How can I customise the HTML generated by the menu webparts View modes: 
User avatar
Member
Member
carl.dickinson-mandogroup - 6/18/2009 11:13:43 AM
   
How can I customise the HTML generated by the menu webparts
I'm evaluating Kentico and my first impressions are it's really great.
I've read the documentation for creating webparts and noticed that the menu controls are webparts. I've used Reflector to review the code and there's a lot I obviously don't want to replicate

I'm not comfortable with the HTML & Javascript generated by the webparts so what can I do to control what is rendered

I work for a web design agency where we have a team of Front End Developers that generate semantic XHTML and trying to force the generated HTML by the webparts will lead me to discontinuing the evaluation

How can I do this without having to rewrite the existing webpart?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 6/26/2009 6:57:53 AM
   
RE:How can I customise the HTML generated by the menu webparts
Hello,

you could eventually use 'RenderedHTML' property of menu controls, that contains HTML code generated by control, and change it as you need in code-behind of web part. You can use e.g. string.Replace method or regular expression.

Best Regards,

Martin Dobsicek