WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Blocks problem

(1/3) > >>

Roych:
Hi

I'm having problems with Content blocks in mamboportal template!
I added a new block but I woul like blocks to be shown one on top of another not side by side how do I do that?

My code is:

--- Quote ---             <?php ob_start();     // start output buffer
page_content(2);   // call menu
$foo=ob_get_contents();    // put outputbuffer in $foo
ob_end_clean();             // clear outputbuffer
if ($foo<>"") {  // some code to execute cause there is some block
  echo '<td valign="top" style="background-repeat: repeat -y; "background="'.TEMPLATE_DIR.'/images/rb.gif">';
  echo '<div class="rightrow">';
  echo '<table cellpadding="0" cellspacing="0" class="moduletable">';
  echo '<tr>';
  echo '<th valign="top">';
  echo 'Info</th>';
  echo '</tr>';
  echo '<tr>';
  echo '<td>';
  echo '<table width="100%" cellspacing="5" cellpadding="0" border="0" align="top">';
  echo '<tr>';
  echo '<td>';
  echo $foo; // show the block (as saved in $foo)
  echo '</td>';
  echo '</tr>';
  echo '</table>';
  echo '</td>';                             
  echo '</tr>';
  echo '</table>';
  echo '</div>';
  echo '</td>';
 
    } else { // some code for no info
}
?>    
<br>
             <?php ob_start();     // start output buffer
page_content(8);   // call menu
$foo=ob_get_contents();    // put outputbuffer in $foo
ob_end_clean();             // clear outputbuffer
if ($foo<>"") {  // some code to execute cause there is some block
  echo '<td valign="top" style="background-repeat: repeat -y; "background="'.TEMPLATE_DIR.'/images/rb.gif">';
  echo '<div class="rightrow">';
  echo '<table cellpadding="0" cellspacing="0" class="moduletable">';
  echo '<tr>';
  echo '<th valign="bottom">';
  echo 'zanimivosti</th>';
  echo '</tr>';
  echo '<tr>';
  echo '<td>';
  echo '<table width="100%" cellspacing="5" cellpadding="0" border="0" align="bottom">';
  echo '<tr>';
  echo '<td>';
  echo $foo; // show the block (as saved in $foo)
  echo '</td>';
  echo '</tr>';
  echo '</table>';
  echo '</td>';                             
  echo '</tr>';
  echo '</table>';
  echo '</div>';
  echo '</td>';
 
    } else { // some code for no info
}
?>
--- End quote ---

Thank you!

R.

Waldschwein:
Hello!

Uhm... That code looks _very_ clumsy for me... Why do you have that much echos in there?
That's not necessary for another block.
Just look there: http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/content-blocks.php

You need to define in info.php that there are some blocks, and after that just use <?php page_content(XX); ?> for your block.

Yours Michael

Edit: Ok... That's inside the mamboportal template... HRM... Perhaps somebody could look there.

Roych:
Thanks for help!

This is the original code, I just duplicated it for another block!
Each blocks should have the name on top.

I'm pasting the image so you couls see what I mean!

[gelöscht durch Administrator]

Waldschwein:
Hello!

Ok, I see. The block at very right (the third one) you want to display in the header, or you want to display that block in a new site ("pop-up"), or just display that block above the "integrated" in the menu?

If I know what you mean I can have a look and try to update that template.

Yours Michael


Roych:
I dont quite understand what you mean so I created another image in photoshop to show you what I want!

I would like to be able to to assign my content to those blocks!

[gelöscht durch Administrator]

Navigation

[0] Message Index

[#] Next page

Go to full version