Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Portal Engine Master Page conditional CSS View modes: 
User avatar
Member
Member
jdsharp - 12/21/2012 10:26:15 AM
   
Portal Engine Master Page conditional CSS
I'm working on a Portal Engine project that has a Master Page that will need to conditionally set a CSS class based upon the layout that a Portal Page has selected. What is the best way to accomplish this?

Cheers,
- Jonathan

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/21/2012 9:12:21 PM
   
RE:Portal Engine Master Page conditional CSS
Hello,

There are different things you can do. For example you can use our new Conditional layouts feature which enables you a layout selection based on a macro condition. Or you can use plain macros for generating the correct link to the CSS file. You can also override the page headers in the CMSPages/PortalTemplate.aspx.cs file:

 // Init the header tags
tags.Text = HeaderTags;


Or you can create a web part, which will change dynamically the class rendered into the page.

Hopefully this gives you some pointers where to start.

Best regards,
Boris Pocatko