Panels 2 tutorials

use panels 2 to layout blog and forum page

digitalfreak - February 21, 2008 - 06:18

thx for your tutorial of creating new front page with Views and Panels 2. Which complete 1/3 of the thing i want to do.

I want to configure the layout of blog and forum page. Can it be done on with Panels 2 ?

for blog the layout i want
--------------------------------------------------------
| blog content | sub rightbar| rightbar |
---------------------------------------------------------

for forum i want the layout to be
-------------------------------------------------------
| forum content |rightbar2 |
-------------------------------------------------------

i know i can simply create a page-blog.tpl.php or page-forum.tpl.php to have a layout of what i want, but with that I do not know the variable that i could use print content of the block to show on "rightbar" region. I only know i could do sth like

<?php
print $rightbar
?>
, and i have to set up the content of rightbar in Administer » Site building » Blocks

and here comes the question, I will have different block content show on the rightbar of blog and forum respectively. Yet some of their item will be shared. In Administer » Site building » Blocks I cannot assign a block to more than one region. I was hoping i could find a php variable for different block content (in my imagination, there shoud be sth like $recent_comment for the "recent comment block"), so that i could simply print that in the page-blog.tpl.php file. However, i cannot find it in the drupal site.

And then i found this Views and Panels combination which could solve my question, however, it introduce another question, how can i reference the "$content" of the blog and forum page ? for the blog page it should be simple with the Views module, but not with forum page. Is there a $variable from drupal i could easily reference the content of the blog and forum page?

Or can i create new variable in panels 2 for me to reference in php, so that i could manage the content of the panels in the panels admin , e.g. $rightbar_panel , and then i could add that variable in the page-blog.tpl.php if that is the case, panel will be like a region but one specific block could be shown in more than one panel, which is unlike what the "default" region, could do.

Or there are simplier way ? can it be done with mini-panel ?

 
 

Drupal is a registered trademark of Dries Buytaert.