AltContent Panels

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
9/27/2011 1:17:08 PM
Gravatar
Total Posts 2253

AltContent Panels

Hi Joe,

Would it break anything if I were to replace the divAlt1 and divAlt2 asp:Panels with div elements? Reason I want to do this is the asp:Panels refuse to render completely empty so I can't use things like the CSS Pseudo Class :empty on them. Even when they have no content whatsoever, they still render with spaces between the opening and closing div tags. If use div elements instead of Panels, the div is rendered completely empty when there is not content placed in the panes.

Thanks,
Joe D.

9/27/2011 1:48:31 PM
Gravatar
Total Posts 18439

Re: AltContent Panels

Hey Joe,

The layout.master code is expecting a Panel there, so you can't really replace it with a div. You could make a control that inherits from Panel then override the render method to prevent the extra white space but that is a bit overkill just to be able to use the :empty pseudo class.

Best,

Joe

9/27/2011 3:06:22 PM
Gravatar
Total Posts 2253

Re: AltContent Panels

Is there any way for mojo to not display the panel at all if it doesn't have any modules, so that it functions like divLeft and divRight?

Thanks,
Joe

9/28/2011 9:02:54 AM
Gravatar
Total Posts 18439

Re: AltContent Panels

Hey Joe,

I've just implemented it so that by default it will hide the alternate divs if they have no modules in them. However its possible that this change will cause a problem for some existing custom skins, so I've made it possible to disable it by setting HideEmptyAlt1="false" and HideEmptyAlt2="false" on the <portal:StyleSheetCombiner in layout.master to override this new default behavior.

This change is in the source code repository now.

Best,

Joe

9/28/2011 3:02:12 PM
Gravatar
Total Posts 2253

Re: AltContent Panels

Thanks, Joe! You 'da man!

later,
Joe D.
 

You must sign in to post in the forums. This thread is closed to new posts.