1
ManXP
Block weight
  • 2005/3/21 21:01

  • ManXP

  • Quite a regular

  • Posts: 231

  • Since: 2003/8/14


Interesting issue with XOOPS.

Using News module as start page and i need to display one custom center block at the top of website. So i created a new block and asigned Weight 0. But block still appears just below all the news and of course isn't visible if user doesn't scroll page down. How can i make it to be displayed above News?

2
ackbarr
Re: Block weight

It's important to note that block weight is only compared to other blocks in the same location (left, center-right, etc), not to module content. To control if blocks appear above or below module content you'll need to modify your theme's theme.html and move the block loops:

        <{if 
$xoops_showcblock == 1}>

        <
table cellspacing="0">
          <
tr>
            <
td id="centerCcolumn" colspan="2">

            
            <{foreach 
item=block from=$xoops_ccblocks}>
              <{include 
file="default/theme_blockcenter_c.html"}>
            <{/foreach}>
            

            td>
          tr>
          <
tr>
            <
td id="centerLcolumn">

            
              <{foreach 
item=block from=$xoops_clblocks}>
                <{include 
file="default/theme_blockcenter_l.html"}>
              <{/foreach}>
            

            td><td id="centerRcolumn">

            
              <{foreach 
item=block from=$xoops_crblocks}>
                <{include 
file="default/theme_blockcenter_r.html"}>
              <{/foreach}>
            

            td>
          tr>
        table>

        <{/if}>
        

and put it above the code to render your module's content:
<div id="content">
          <{
$xoops_contents}>
        div>


It is not possible to have module content to be positioned in-between center aligned blocks (i.e. blocks both above and below the content).

Please note that both code snippets are taken from the default XOOPS theme and may differ from the theme on your site.

3
showcase17
Re: Block weight
  • 2005/3/21 21:59

  • showcase17

  • Not too shy to talk

  • Posts: 190

  • Since: 2005/1/6 0


You cannot solve this prob with blockweights!

What you are going to have to do is modify your theme.html. The way it's set now is it shows all newsitems on top. You should move that part down.

The best way to do this is in dreamweaver.. Take a copy of your theme.html and rename the original theme.html (so you'll always have a working copy on your server which will work again by just renaming it back).

When opened with dreamweaver you'll see 3 colomns: left, middle and right. Take the middle column and re-arange this part up: '<{foreach item=block from=$xoops_ccblocks}> <{include file="default/theme_blockcenter_c.html"}> <{/foreach}>'.

Just try, you'll still have a original (renamed) theme.html on your server in case something goes wrong!

Login

Who's Online

287 user(s) are online (215 user(s) are browsing Support Forums)


Members: 0


Guests: 287


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits