0

I sort of ran into a problem here, for a new project a piece of the homepage can have different layouts.

For example:

-----------------
| N  |    C     |
| E  |    O     |
| W  |    N     |
| S  |    T     |
|    |    E     |
|    |    N     |
|    |    T     |
-----------------

or

-----------------
|       C       |
|       O       |
|       N       |
|       T       |
|       E       |
|       N       |
|       T       |
-----------------

or

-----------------
|               |
|     NEWS      |
|               |
-----------------

So there are 3 types of layouts, news + content, just content and just news. What would be the best way to do this? Currently I'm using Panels to build the homepage, this is just a small part of it.

It also would have to be very convenient for the user to switch styles, any ideas for this?

3 Answers 3

0
  1. You can use Panels, Display Suite and Context to build a different layout flexible and custom layout in your theme.

  2. You can also build a custom theme with there layouts and switch the layout home page based on context. If you are planning for theme, you can write a subtheme for Omega, a HTML5 base theme, or can you choose the best base theme as per your need.

3
  • Thanks, but none of those are what I'm looking for. Would there be a way to create a new content type with a select list for the layout, and use this value as a class/id selector on my Panel? In that case I can solve it all with CSS.
    – woutr_be
    Commented Aug 1, 2012 at 9:16
  • Context module lets you define contexts based on different criteria. As a reaction to these criteria, the module can add a css class to the body element. Commented Aug 1, 2012 at 9:32
  • I used context before, but I can't select a node from a specific content type and then use a value for the body class. That's what I'm looking for.
    – woutr_be
    Commented Aug 1, 2012 at 10:27
0

Homebox module allows you to manage the layout which you show in the Graphics. This is also implemented in Drupal's official website. In this users can also have choice to disable/enable blocks.

So you can create two blocks:

News and Content. Add this blocks to homebox.

0

Sorry, I kind of lost track of this issue.

What I ended up doing was using an extra custom field as a class selector, that way I was able to use javascript to show or adjust different part of the content.

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.