Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > How to use different CSS List Menu web parts in device layouts View modes: 
User avatar
Member
Member
_charleswesley - 8/7/2013 1:17:18 PM
   
How to use different CSS List Menu web parts in device layouts
I am struggling to make changes in separate device layouts.

The default page template has a CSS List Menu that shows one level.

I would like to change the CSS List Menu to show all child levels in device layouts for mobile devices.

I have a separate device layout created, however I can't figure out how to hide the original web part or conditionally change the levels it displays.

Any tips?

User avatar
Member
Member
kentico_sandroj - 8/7/2013 1:53:52 PM
   
RE:How to use different CSS List Menu web parts in device layouts
Hello,

One option would be to use macros in the Visibility property of the Web part. Depending on your requirements, this may need a custom macro but one of the default macros might work as well.

Please let me know if you have any additional questions.

Regards,
Sandro

User avatar
Member
Member
_charleswesley - 8/7/2013 2:31:01 PM
   
RE:How to use different CSS List Menu web parts in device layouts
Is there any pro/con argument to be made for using macros versus conditional layouts?

Example:

<cms:CMSConditionalLayout runat="server" id="desktopNavigation" visibleForDeviceProfiles="Default">
<cms:CMSWebPartZone ZoneID="zoneHeaderNav" runat="server" />
</cms:CMSConditionalLayout>

<cms:CMSConditionalLayout runat="server" id="mobileNavigation" visibleForDeviceProfiles="iPhone">
<cms:CMSWebPartZone ZoneID="zoneMobileHeaderNav" runat="server" />
</cms:CMSConditionalLayout>

User avatar
Member
Member
Accepted solutionAccepted solution
kentico_sandroj - 8/7/2013 4:16:05 PM
   
RE:How to use different CSS List Menu web parts in device layouts
Hello,

Conditional layouts are better for performance. If they fulfill your requirements I would recommend using them over custom macros. In some cases it might be easier to use a custom macro (depending on how many pages and the logic requirements) but I would check the performance impact with our debugging tools.

User avatar
Member
Member
_charleswesley - 8/7/2013 4:36:54 PM
   
RE:How to use different CSS List Menu web parts in device layouts
Thank you for the feedback and the debug tools reference!