Posted on: 06/25/05 01:37pm
By: jonc
I am completely customizing the classic theme for my church. I need a handful of static pages and some of them I don't want the left blocks.
The header.thtml finishes with the following code:
<table bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td class="featureblock" valign="top">
{geeklog_blocks}
<br><img src="{site_url}/images/speck.gif" width="150" height="1" alt="">
</td>
<td><img src="{site_url}/images/speck.gif" width="10" height="1" alt=""></td>
<td width="100%" valign="top">
So even if {geeklog_blocks} is replaced with nothing, I still get the 160px of spacers. leftblocks.thtml has the same code. I believe the answer I am looking for is in COM_siteheader() in lib-common.php. I would like to remove the last 6 lines from the header.thtml file and call the leftblocks.thtml if the left blocks are in fact requested.
view my problem:
here[*1]
thtml help
Posted on: 06/25/05 02:35pm
By: machinari
get rid of this and the cell should collapse when no content exists...
<img src="{site_url}/images/speck.gif" width="150" height="1" alt="">
thtml help
Posted on: 06/25/05 05:40pm
By: jonc
well I tried that first, but then the whole column collapses to about 35px wide which looks rediculous. I then went into the blockheader.thtml and put the spacer in there, but the right blocks (which are viewed on some pages) are set up to be 180 px wide, so that is not working either.
Believe me, I would prefer to have a simple solution, but I really think I need to have the COM_siteheader() call the leftblocks.thtml instead of parsing the {geeklog_blocks} in the header.thtml.
BTW, I also tried using a PHP IF statement to remove those lines if ({geeklog_blocks}==''), but the the template file won't parse php (I thought there was a hack to make that happen).
Anyone know where in the COM_siteheader() [i think line 900ish in the lib-common.php] that the template files are called. I simply don't know enough about templates.
thtml help
Posted on: 06/25/05 06:30pm
By: jonc
there were only a few places where I needed right blocks and I moved them, so I put the spacer in the blockfooter.thtml and all is well.
I would however like to fix this properly at some point, so if someone knows how to fix my original problem, please let me know.
thtml help
Posted on: 06/25/05 07:50pm
By: machinari
[QUOTE BY= jonc] well I tried that first, but then the whole column collapses to about 35px wide which looks rediculous.[/QUOTE]I thought you are asking for a way to get rid of the space?? removing the spacers (and padding) will do that for you. leftblocks.thtml has the same code to ensure consistency when there are leftblocks to be had--you can remove the spacers from there as well. If you lack consistency in your appearing blocks afterwards, then use a css rule applied to blockheader.thtml or some such thing.
so.. take that table out of header.thtml altogether and just have {left_blocks} in its place. remove everything from leftblocks.thtml as well except for {geeklog_blocks}.
or, is the issue that the staticpage editor doesn't give you the option to have a page appear with only right blocks??? or both?
thtml help
Posted on: 06/25/05 09:41pm
By: jonc
ok - that was the tidbit of information that I needed. Replace the table in header.thtml with {left_blocks}, then the spacer only shows up when there are left blocks.
One little note though - leftblocks.thtml (in classic theme) needs one more line to start the next cell or else all the main content will appear under the leftblocks as a new row.
<td width="100%" valign="top">
thanks a million