Hi
My theme has 3 collumns on index page. Please see this screenshot: http://img232.imageshack.us/img232/7326/pagenw7.png

Collumn 2 and Collumn3 need to hold right_sidebar elements, like : "Active forum topics", "New forum topics" an "Login Form"

In collumn2 I want to see only the following elements: Active forum topics, New forum topics.
In collumn3 I want to see the login form.

I have the following code in /theme/page.tpl.php:

<div class="sidebar-right">
<?php if ($sidebar_right) { ?>
    <?php print $sidebar_right; } ?>
</div>


<div id="footer">
  <?php print $footer_message ?>
</div>
<?php print $closure ?>
</body>
</html>

This code generate the following HTML output:

<div class="sidebar-right">
      <div class="block block-forum" id="block-forum-0">
    <h2 class="title">Active forum topics</h2>
    <div class="content"><div class="item-list"><ul><li><a href="/bsdforums/?q=node/2">Bine ati venit</a></li></ul></div><div class="more-link"><a href="/bsdforums/?q=forum" title="Read the latest forum topics.">more</a></div></div>
 </div>
  <div class="block block-forum" id="block-forum-1">
    <h2 class="title">New forum topics</h2>

    <div class="content"><div class="item-list"><ul><li><a href="/bsdforums/?q=node/2">Bine ati venit</a></li></ul></div><div class="more-link"><a href="/bsdforums/?q=forum" title="Read the latest forum topics.">more</a></div></div>
 </div>
  <div class="block block-user" id="block-user-0">
    <h2 class="title">User login</h2>
    <div class="content"><form action="/bsdforums/?q=node&amp;destination="  method="post" id="user-login-form">
<div><div class="form-item">
 <label for="edit-name">Username: <span class="form-required" title="This field is required.">*</span></label>

 <input type="text" maxlength="60" name="edit[name]" id="edit-name"  size="15" value="" class="form-text required" />
</div>
<div class="form-item">
 <label for="edit-pass">Password: <span class="form-required" title="This field is required.">*</span></label>
 <input type="password" maxlength="" name="edit[pass]" id="edit-pass"  size="15"  class="form-text required" />
</div>
<input type="submit" name="op" value="Log in"  class="form-submit" />
<div class="item-list"><ul><li><a href="/bsdforums/?q=user/register" title="Create a new user account.">Create new account</a></li><li><a href="/bsdforums/?q=user/password" title="Request new password via e-mail.">Request new password</a></li></ul></div><input type="hidden" name="edit[form_id]" id="edit-user-login-block" value="user_login_block"  />

</div></form>

</div>
 </div>
  <div class="block block-user" id="block-user-3">
    <h2 class="title">Who's online</h2>
    <div class="content">There are currently 0 users and 1 guest online.</div>
 </div>
</div>


<div id="footer">

  
</div>
</body>
</html>

I need the following HTML output to achieve my goal:

<div class="sidebar-right">
      <div class="block block-forum" id="block-forum-0">
    <h2 class="title">Active forum topics</h2>
    <div class="content"><div class="item-list"><ul><li><a href="/bsdforums/?q=node/2">Bine ati venit</a></li></ul></div><div class="more-link"><a href="/bsdforums/?q=forum" title="Read the latest forum topics.">more</a></div></div>
 </div>
  <div class="block block-forum" id="block-forum-1">

    <h2 class="title">New forum topics</h2>

    <div class="content"><div class="item-list"><ul><li><a href="/bsdforums/?q=node/2">Bine ati venit</a></li></ul></div><div class="more-link"><a href="/bsdforums/?q=forum" title="Read the latest forum topics.">more</a></div></div>
 </div>
</div>
<div class="sidebar-right">
  <div class="block block-user" id="block-user-0">
    <h2 class="title">User login</h2>

    <div class="content"><form action="/bsdforums/?q=node&amp;destination="  method="post" id="user-login-form">
<div><div class="form-item">
 <label for="edit-name">Username: <span class="form-required" title="This field is required.">*</span></label>

 <input type="text" maxlength="60" name="edit[name]" id="edit-name"  size="15" value="" class="form-text required" />
</div>
<div class="form-item">
 <label for="edit-pass">Password: <span class="form-required" title="This field is required.">*</span></label>
 <input type="password" maxlength="" name="edit[pass]" id="edit-pass"  size="15"  class="form-text required" />

</div>
<input type="submit" name="op" value="Log in"  class="form-submit" />
<div class="item-list"><ul><li><a href="/bsdforums/?q=user/register" title="Create a new user account.">Create new account</a></li><li><a href="/bsdforums/?q=user/password" title="Request new password via e-mail.">Request new password</a></li></ul></div><input type="hidden" name="edit[form_id]" id="edit-user-login-block" value="user_login_block"  />

</div></form>

</div>
 </div>
  <div class="block block-user" id="block-user-3">
    <h2 class="title">Who's online</h2>
    <div class="content">There are currently 0 users and 1 guest online.</div>

 </div>
</div>
</div>

<div id="footer">

  
</div>
</body>
</html>

Please see this screenshot: http://img231.imageshack.us/img231/5029/page2qb2.png
This is what I need.

I want to do the whole thing with :

<div class="sidebar-right">
<?php if ($sidebar_right) { ?>
    <?php print $sidebar_right; } ?>
</div>

Anyone has some suggestion to help me ? What exactly I need to do ?
I appreciate any help.

Thank you !

Comments

VM’s picture

To get that extra region you will need to create a new region in that area.

http://nicklewis.org/node/846 is an excellent easy to understand tutorial on how to create regions.

once the region is created you will then be able to goto administer -> blocks and set the login block to the newly created region.

zoliky’s picture

I read the article and I tell you if work.
Thank you!

zoliky’s picture

I read the documentation but not work.
Please see this is my administrator panel : http://img207.imageshack.us/img207/8956/sidebarjn8.png
I need to see the login form in "article blocks" (article blocks is a temporary name now).

Any idea, what need to do ?

zoliky’s picture

I solve the problem, now I see 3 collumn:

http://img222.imageshack.us/img222/9251/thepagezp9.png

Now I want to do a trick. If someone click on "Create Content" in Administrator panel, I want to hide collumn 3 and add the navigation bar to second collumn.

The first collumn need to show the content and second collumn need to show the navigation bar, active forum topics, etc..

Now my page.tpl.php has :

<body class="multicol">

I need to put this to hide collumn 3:

class="withbreadcrumb"

I need some suggestion, please help me. I want to solve this obstacle.

Thanks !

webchuck’s picture

Why do you need to stick with only one right sidebar region? I'm no drupal expert, but I don't believe you're going to accomplish two columns within one region without some fancy CSS and some awkward spacing issues.

OR you could create another region called "sidebar-far-right", add your login to this region, and be done...

----------------------------------------
Chuck Crandall
WebChuck Web Development
chuck at webchuckweb dot com
----------------------------------------

zoliky’s picture

Please tell if you don't understand my question, I explain in more details. Someone help me ?
Thanks!