Sitefinity 4.0 and DIV madness
Hi,
<
div
id
=
"Navigation_TEF52C714000"
>
<
div
id
=
"Navigation_TEF52C714000_ctl00_conditionalTemplate"
>
<
div
id
=
"ctl00_Navigation_TEF52C714000_ctl00_siteMapControl"
class
=
"RadMenu RadMenu_PrimaryNav"
>
<!-- RadMenu Unordered list here -->
</
div
>
</
div
>
</
div
>
<
div
class
=
"sfContentBlock"
>
<!-- Content -->
</
div
>
<
span
id
=
"Slider_C015"
>
<!-- Your SimpleView controls HTML probably containing block elements -->
</
span
>
Hey there,
Hi Webinsite,
Thank you for your feedback. It is very useful for us.
We will consider reducing the number of wrapping DIVs. I am not sure it will be possible for all cases but we will try. Sometimes extra DIVs are needed for binding reasons. As for the Navigation widget, it is wrapped in a conditional template so we don't have a different ASCX file for each mode but all navigation templates are included in one file. The two extra DIVs in this case are the wrapping DIV of the widget and the wrapping DIV of the condition. We will consider how to optimise HTML for such cases as well.
The Content block control has a default CSS class which is added to an additional DIV. We will change the control so if you delete the CSS class (it is in Advanced properties) not DIV will be rendered.
The wrapping SPANs are rendered around ASP.Net controls by default. You can turn this SPAN into a DIV or remove it if you override methods like RenderBeginTag and RenderEndTag, or TagKey.
We will fix the issues with the CSS layout file being linked to pages that don't use Layout widgets for official Sitefinity release.
Let us know if you have further comments or you need help.Hi Chris,
Hi Georgi,
Div around the content block should always be there! :)
There's no many cases where you need to set a style specifically to what's in a GC block
(please keep that one) :)
5.4 question
I create a .master with my div (green in screenshot) and added in Sitefinity a layout region.
Gave the layout region same classes (wrapper, left, right)
a) the div still render style= can this be prevented
b) the created <div seem to have an extra div in it by default - can this be prevented
c) am I doing something wrong?
Screenshot might explain it a bit better.
Markus
@Markus
How did you manage to get the markup like that?
75%+17% != 100, and where's the "sf_2cols_1_75 and sf_2cols_2_25" classes on the Out div?
Seems that any change to the editor puts all the options onto the elements, it's not checking to see if 75 and 25 have been changed...I can't see this being a huge priority :)