1
astrix
Center Block Order
  • 2004/8/27 18:43

  • astrix

  • Just popping in

  • Posts: 30

  • Since: 2004/8/16


I'm having trouble figuring out how to keep my center-center block above my news. I realize the news is content so it depends on where the content div goes in the theme.html. However, I'm running into a problem. When I place my content <div></div> block below the center/center and above center/left, the content does not appear below the center center block, it's still above the center block! If I put the <div></div> content within the <td></td> of the center/center block, it works, but when I go to certain modules, such as "Contact Us" or any other module I made, (I think it has to do with any module that uses template), no content is shown. Instead of the content, the left and right columns stretch out to fill the space where the center columns should be. This is really annoying, can anyone help? This is my theme.html (relevant html) - here I tried putting the <div> below center-center and above center-left, but the center block still doesn't show up above the content:

<td id="centercolumn">


        <!-- 
Display center blocks if any -->
        

         <{if 
$xoops_showcblock == 1}>  

        <
table cellspacing="0">

          <
tr>

            <
td id="centerCcolumn" colspan="2">



            <!-- 
Start center-center blocks loop -->

            <{foreach 
item=block from=$xoops_ccblocks}>

              <{include 
file="default/theme_blockcenter_c.html"}>

            <{/foreach}>

            <!-- 
End center-center blocks loop -->

            </
td>

          </
tr>
          
          <
div id="content">

              <{
$xoops_contents}>

          </
div>
          
          <
tr>

            <
td id="centerLcolumn">



            <!-- 
Start center-left blocks loop -->

              <{foreach 
item=block from=$xoops_clblocks}>

                <{include 
file="default/theme_blockcenter_l.html"}>

              <{/foreach}>

            <!-- 
End center-left blocks loop -->



            </
td><td id="centerRcolumn">



            <!-- 
Start center-right blocks loop -->

              <{foreach 
item=block from=$xoops_crblocks}>

                <{include 
file="default/theme_blockcenter_r.html"}>

              <{/foreach}>

            <!-- 
End center-right blocks loop -->



            </
td>

          </
tr>

        </
table>

       <{/if}> 
       
        <!-- 
End display center blocks -->


      </
td>



2
jlm69
Re: Center Block Order
  • 2004/8/27 23:34

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I don't know if I follow you, but to set a custom block above any other block or content you set the weight when creating or editing a block. I have set a center/center block with the weight set to 0, and the news as my front page and everything works the way I think you want. block on top and news under it.

Hope that helps.

3
astrix
Re: Center Block Order
  • 2004/8/27 23:48

  • astrix

  • Just popping in

  • Posts: 30

  • Since: 2004/8/16


Hi,

Thanks for your reply. The problem is that even if is the custom block weight to 0, it still appears below my news section :(. I'm not sure why though.

4
astrix
Re: Center Block Order
  • 2004/8/28 0:00

  • astrix

  • Just popping in

  • Posts: 30

  • Since: 2004/8/16


Also, I moved the content section back to where it was, above the all the other center block declarations. Even setting the center block weight to 0 puts it under my news (I assume it's because the content <div></div> is above the sections for all the other center blocks).

5
jlm69
Re: Center Block Order
  • 2004/8/28 0:00

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I just tested that on 6 different themes, I did find that problem only on one theme x2t, all other themes it worked the right way. Is that the theme you are using? Maybe try a different theme.

6
astrix
Re: Center Block Order
  • 2004/8/28 0:09

  • astrix

  • Just popping in

  • Posts: 30

  • Since: 2004/8/16


I'm actually using the default theme.....

I was wondering, can you do me favor and post your theme.html? That way I can compare if everything is where it should be in my theme.html

7
jlm69
Re: Center Block Order
  • 2004/8/28 0:12

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


Below is the default theme.html from 2.0.7


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<meta name="robots" content="<{$xoops_meta_robots}>" />
<meta name="keywords" content="<{$xoops_meta_keywords}>" />
<meta name="description" content="<{$xoops_meta_description}>" />
<meta name="rating" content="<{$xoops_meta_rating}>" />
<meta name="author" content="<{$xoops_meta_author}>" />
<meta name="copyright" content="<{$xoops_meta_copyright}>" />
<meta name="generator" content="XOOPS" />
<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
<!-- RMV: added module header -->
<{$xoops_module_header}>
<script type="text/javascript">
<!--
<{$xoops_js}>
//-->
</script>
</head>
<body>
<table cellspacing="0">
<tr id="header">
<td id="headerlogo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>logo.gif" width="150" height="80" alt="" /></a></td>
<td id="headerbanner"><{$xoops_banner}></td>
</tr>
<tr>
<td id="headerbar" colspan="2">&nbsp;</td>
</tr>
</table>

<table cellspacing="0">
<tr>
<td id="leftcolumn">
<!-- Start left blocks loop -->
<{foreach item=block from=$xoops_lblocks}>
<{include file="default/theme_blockleft.html"}>
<{/foreach}>
<!-- End left blocks loop -->

</td>

<td id="centercolumn">

<!-- Display center blocks if any -->
<{if $xoops_showcblock == 1}>

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

<!-- Start center-center blocks loop -->
<{foreach item=block from=$xoops_ccblocks}>
<{include file="default/theme_blockcenter_c.html"}>
<{/foreach}>
<!-- End center-center blocks loop -->

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

<!-- Start center-left blocks loop -->
<{foreach item=block from=$xoops_clblocks}>
<{include file="default/theme_blockcenter_l.html"}>
<{/foreach}>
<!-- End center-left blocks loop -->

</td><td id="centerRcolumn">

<!-- Start center-right blocks loop -->
<{foreach item=block from=$xoops_crblocks}>
<{include file="default/theme_blockcenter_r.html"}>
<{/foreach}>
<!-- End center-right blocks loop -->

</td>
</tr>
</table>

<{/if}>
<!-- End display center blocks -->

<div id="content">
<{$xoops_contents}>
</div>
</td>

<{if $xoops_showrblock == 1}>

<td id="rightcolumn">
<!-- Start right blocks loop -->
<{foreach item=block from=$xoops_rblocks}>
<{include file="default/theme_blockright.html"}>
<{/foreach}>
<!-- End right blocks loop -->
</td>

<{/if}>

</tr>
</table>

<table cellspacing="0">
<tr id="footerbar">
<td><a href="https://xoops.org/" target="_blank"><img src="<{$xoops_imageurl}>poweredby.gif" alt="" /></a></td>
</tr>
</table>
</body>
</html>

8
astrix
Re: Center Block Order
  • 2004/8/28 0:25

  • astrix

  • Just popping in

  • Posts: 30

  • Since: 2004/8/16


OK, i see the problem.

I want my content below the center center block but above the center/left center/right blocks.

Is that possible?

9
jlm69
Re: Center Block Order
  • 2004/8/28 0:33

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


You should be able to set the weight to a higher number.
0 for top, 1 for under that ,2 for under that.

Hope that helps.

10
astrix
Re: Center Block Order
  • 2004/8/28 1:00

  • astrix

  • Just popping in

  • Posts: 30

  • Since: 2004/8/16


Setting my center/center block weight to 0 puts it above everything else, where I want it. However, I also have 2 center/left blocks that, no matter what weight I set, won't move below my news.

Login

Who's Online

154 user(s) are online (97 user(s) are browsing Support Forums)


Members: 0


Guests: 154


more...

Donat-O-Meter

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

Latest GitHub Commits