21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 386 Views |
-
Create multiple column layouts in backend

13 March 2012 at 6:54am
hi,
there are some old forum posts about this thema ... but I want to ask you again, may some of you have new innovative solutions or may know a module to do this:
Whats the best way to give a user the possibility to create multiple columns in backend?
For example I want a layout with a 100% col, then 3 cols, then 2 cols, then again a 100% col. In each col I want to insert just HMTL content (HTMLText).And I dont mean just to give him some page types with different layouts, thats not very flexible ...
happy ss'ing
-
Re: Create multiple column layouts in backend

20 March 2012 at 10:41pm
I'm not entirely sure what you mean by "100% col, then 3 cols, then 2 cols, then again a 100% col." - as in 100% at the top, 3 underneath, 2 under that and then 100% at the bottom?
Could you not achieve this by adding extra HTMLEditor fields or TextArea fields for each of the columns? Then styling them in your template - you could use a set of 'if' statements to achieve different layouts based on which columns are filled in.
Unless someone has a better idea?
-
Re: Create multiple column layouts in backend

21 March 2012 at 11:10am
hi
"as in 100% at the top, 3 underneath, 2 under that and then 100% at the bottom?" => YES I mean like that
The user should can create multiple column layouts without using page types. All the needed HTML code should stored
just in $Content field ... so it's more a JS thing I think ... -
Re: Create multiple column layouts in backend

21 March 2012 at 11:46am
To achieve this in the past, I have created one page type for each of the different required layouts, then coded CSS accordingly
ie)
TwoColumnPage.php
ThreeColumnPage.phpThen the user just selects which layout they desire by picking the corresponding page type.
Multiple Content Areas may be necessary as pointed out by kinglozzer
Cheers,
Josh -
Re: Create multiple column layouts in backend

23 March 2012 at 3:41pm
I use CSS3 for doing this now.
http://www.w3schools.com/css3/css3_multiple_columns.asp
Or I just create new HTMLEditorField for each column.
You could create a has_many rule to a object like
<?php
class Column extends DataObject {static $db = array(
"Content" => "HTMLText",
);public static $has_one = array(
"Page" => "Page"
);
}And then use a complexTableField to create as many columns as you want for each page... maybe. You will need to create some funky Template loops and also clever CSS or javascript to float and set widths of each column.
Hope this helps
| 386 Views | ||
|
Page:
1
|
Go to Top |




