Zones CSS overrides

Topics: Customizing Orchard, Writing themes
Jul 21, 2011 at 3:42 PM

Just getting to grips with the themes zones etc

Im adding a footer in layout.cshtml

<!-- ADD FOOTER -->

 WorkContext.Layout.Footer.Add(New.Footer(), "5");

@if (Model.Footer != null){    @Zone(Model.Footer)}

This loads in Footer.cshtml

<footer id="page-footer">     
<ul class="footer">
etc
</ul>
</footer>

Orchard generates this fine but wraps the View in this DIV:

  <div class="zone zone-footer">

<footer id="page-footer">     
<ul class="footer">
etc
</ul>
</footer>
</div>

Is this a necessary extra container as it seems to add alot of extra height to the <footer> preventing it being flush to the bottom of the window?

The CSS zones are reset so should affect layout:

.zone { }

 

Coordinator
Jul 21, 2011 at 7:00 PM

No markup is necessary to Orchard, no. You could override the rendering of zones easily, and you would only have to adjust your CSS and maybe some JS if you have any that relies on the structure of the HTML. That's it.