0

i have a view page and two blocks which i want to display next to each other. I want view content on left and two blocks on right, with one block on top and other just below it. But i am having trouble in achieving the same. My html guy says its not possible to do that without a wrapper container as we need to have things in center as well.

I have omega 4 installed, so sidebar is also below the content block. Also i don't have consistent layout view, as on some pages i have only content with full screen background, and with no side content and on some i have content in which i am facing a problem.

I have searched on google and SO but every solution says to have a wrapper, which is not possible as placing a wrapper globally will limit the display on every screen, which i can't have.

One solution i can think of is use javascript to add classes on page load where i have two column display but it is not a good way to do that i believe.

How can i solve this, can anyone please help??

2 Answers 2

1

You can make use of Panels Module to achieve any kind of Complex Layouts

0
1

My friend.

Your Html guy is right about the wrapper things.

Don't worry in drupal it is very simple to create a custom 'block-table-type' layout .

It is can be achieved by Panels and Minipanels.

Now, How will you do it ?

This markup your HTML guy needs will be generated in three easy steps

  1. Download and enable the Panels and Mini panel module by going to admin/modules page. (You will get 5 new modules with this main module - panels_node, panels_mini, panels_ipe, i18n_panels, panels).

    All these 5 modules hold their dependencies on [ctools] module which you need to download and enable before enabling these modules2

  2. Then go to Structure > Mini Panel > Add mini panel button and complete the simple creation wizard. STEPS. settings - Add the Administrative title for the minipanel. Hit next -> Context- (Here You add the context for the mini panel - In our case we don't need it). Hit next. Then , Select the layout from the drop box.

  3. Finally , Add the blocks or fields you want that minipanels in the different frames by selecting Add Content link comes when you will click on the cogwheel placed on the top right part. And hit save. Now you will get this mini panel as a block in your blocks list . Just go to structure > blocks . This block will be a div which will wrap your other blocks (That you have added to it) in the proper markup your HTML guy needs ;). Now you just need to place this block to some region.

The beauty of this module is that you can add a minipanel into another mini panel and can accomplish any complex grid design. Moreover if you enable Panel Node module than you can add new node specific grid page , called panel variant n drupal way of speaking.

Hope this helps . Have fun !

2
  • Only i can accept one correct answer and first Pravin guided me into right direction so hence his answer is accepted as an answer :) Commented Nov 18, 2014 at 17:07
  • Its alright . The main motive is to give you the proper Idea about this module .:) Commented Nov 19, 2014 at 10:05

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.