This project is read-only.

Insert widget at specific column in layout

Topics: Customizing Orchard, General
Jan 24, 2014 at 12:54 PM
I'm currently converting an existing theme to orchard for a client. Problem is that the client wants to be able to insert html widget in content-zone at certain colums in the layout

The content zone is made up of 16 columns. So you can have max 16 columns and then there must be a <div class="clearfix"> before the next 16 columns are inserted

The theme is composed of Header, Content and Footer zones.

I know I can define a lot of zones and override each zone but that seems like hacking.
I have also done an alternate for the widget and trid to look at the position for the widget and if its an even position add <div class="clearfix">

Ex. html layout ootb
<div class="content- main">
 <div class="column8>
 <div class="column8">
 <div class="clearfix">
 <div class="column16>
There must be someone who faced this issue?
Jan 30, 2014 at 6:19 PM
Maybe I didn't make my self clear.
Lets say I have only one zone, Content. In that zone I want to be able to insert different html-widgets that must render with different column sizes (span2 span4 and so on)

Is the only way to create many different widgets with proper names like (HTML Widget Span 1, HTML Widget Span 4....) and then implement a wrapper for each?

Jan 30, 2014 at 6:47 PM
Hey gmorken, I know this is probably not the response that you are looking for, but probably the best place to start. Have you read and understood the documentation over theming in the orchard documentation. See the "Creating Themes" section.

It sounds like you are probably trying to create alternates for particular types of widgets. The documentation will show how to accomplish this. Also, looking at existing modules and themes for guidance has proven very helpful for me.