Making Content Block with Style Sheet

Posted by Community Admin on 05-Aug-2018 16:18

Making Content Block with Style Sheet

All Replies

Posted by Community Admin on 19-Nov-2011 00:00

Hi,
We are developing an application with Sitefinity 4.1 and so fur our approach was to create different templates and then assign style sheet for that template. However that is creating an issue when content editor is dragging a user widget to a template which does not have the styles associated with it.
We are thinking of a possibility of these - could you please let me know whether that is possible and if yes give us some directions on that:

1. Can we create a unique generic content block that has a unique div class. The idea is that we would create multiple “generic content blocks” with unique “div classes”. This would allow us to apply styles to these blocks through a css style sheet. If this option is possible, we would be able to create styled blocks for many of our layouts that can be dragged over from the “widgets” section on the right. These blocks will also be able to be updated with html, content, images, etc…this is not a widget that is unable to be edited.


2. If option 1 is not possible, can we create a unique layout module that has a unique div class. If this option is possible, we would be able to apply styles to the layout. Doing this would allow us to drag and drop different layouts onto apage to create a desired look/feel. Once a layout would be dragged onto a page we could place a generic content control over it.

Posted by Community Admin on 19-Nov-2011 00:00

+1 for layouts

LINK

IMO this is the prefered way to do it.  Reason being is that it lets you put ANY widget inside of them..

So on the link above you need to either wrap the outer div (

<div runat="server" class="sf_cols">
With another div, or just add a new class name to it (so: class="sf_cols style1")

Cheers,
Steve

Posted by Community Admin on 30-Nov-2011 00:00

Thanks Steve, It worked.

This thread is closed