2

I want to override the default three-column layout used by the Display Suite module, and I want to use only the left and right columns, without the middle one.
What is the easier way to achieve this?

2
  • D6 or D7? Do you mean easiest way?
    – dddave
    Aug 15, 2011 at 11:44
  • D6, and yes, easiest way Sep 9, 2011 at 12:29

2 Answers 2

2

The easiest way would be to override the nd_regions.css file in your theme and put something like the following in it:

.nd-region-header,
.nd-region-footer {
  clear: both;
}
.nd-region-left {
  width: 50%;
  float: left;
}
.nd-region-right {
  width: 50%;
  float: right;
}
.nd-region-middle-wrapper {
  display: none;
}

Simply don't put anything in the DS middle column, manage a gutter and you'll be fine.

2

I just now have a similar requirement. I want to be able to change the css file for a layout. But that would change the layout for all content that needs the original built-in layout.

In the end I think it easier to set up a custom layout. That will need a custom folder in your current theme. I just that for the first time and it works great.

So you could copy both the css and the tpl.php files from the display suite 3 col default files into your own custom folder at \sites\all\themes\yourtheme\ds_layouts. In my case I now have a \sites\all\themes\bartik\ds_layouts\rs_2col_stacked folder with these 3 files:

rs_2col_stacked.css, rs_2col_stacked.inc, rs_2col_stacked.tpl.php

It is easy enough to make it worthwhile because you can be total free to work with your custom settings and never sweat over messing up the built-ins. After I watched this video Display Suite for Drupal 7 - Part 2: configuring a layout on youtube I decided to get around to installing drush on my windows pc, then on a ubuntu server. The video is by a creator of display suite and near the end of it he shows how to very quickly create a simple custom layout. Then you can read over the short lines of code in the created files and adapt code to set up the custom layout your really need. You just need to copy default files and edit them as need. The .inc is a little tricky to understand but it's tiny. Let me know if you need more help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.