views:

21

answers:

2

Is there any way to place 2 views in a 2 columns page in Drupal without having to install the Panels module ?

N.B. The 2 columns layout should be used only for this page.

thanks

A: 

Without Panels or Context[http://drupal.org/project/context] modules, you got two options.

  1. You can make the views into blocks.
  2. You can load and render the views manually in a custom module.
googletorp
If I add the views in 2 custom blocks, then I can add the blocks to the content-area, however I still cannot display them as 2 columns.. I have to write my css code for that?
Patrick
@Patrick No matter how you choose to do it, you'll have to write some css code, unless you use Panels which has ready made css code. The code to make a 2 columns layout is quite simple tough.
googletorp
A: 

You can insert views via PHP in the node of the page, and then use custom HTML/CSS to make the views occupy a column each. Check this article and discussion, for example, where the code to insert the view is the following:

<?php $view = views_get_view('viewname'); print $view->execute_display('default', $args); ?>

This will, of course, require full permissions for the node editing, but if this is just for one page, I assume you have all the needed permissions to do it once.

NPC

related questions