Portal Engine
Version 3.x > Portal Engine > Code blocks in master page View modes: 
User avatar
Member
Member
adrian.bogucki - 10/15/2008 4:41:56 AM
   
Code blocks in master page
Hi!
I am developing a site using Kentico CMS. I like it, yet I am stuck on a little problem. I have created a Master Page using Portal engine, but I need the Master Page to be dynamic, i.e. I want it to have code blocks inside. For instance, I want to display different elements when the site is in Edit mode and different in Display mode. Unfortunately I don't know how to make it work. The usual <% %> tags don't seem to be parsed by the server. The ASPX approach is not acceptable, because I need Web Parts and those are only available using the Portal engine.
I appreciate any help. Thanks!

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 10/15/2008 7:55:44 AM
   
RE:Code blocks in master page
Hello,

I would try to develop a custom web part with custom code. After that you can add your web part to the page using the portal engine. I don't know if this is an acceptable approach for you. For more information please see our developers guide at http://devnet.kentico.com/docs/devguide/developing_web_parts.htm.
It is also possible to combine the ASPX approach and the portal engine. Please see the following link for details http://devnet.kentico.com/docs/devguide/combining_aspx_templates_and_p.htm.

Best Regards,
Boris Pocatko