Welcome to Geeklog, Anonymous Sunday, June 26 2022 @ 10:53 pm EDT

Geeklog Forums

thtml help


Status: offline

jonc

Forum User
Chatty
Registered: 09/12/04
Posts: 50
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:

Text Formatted 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
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
get rid of this and the cell should collapse when no content exists...
Text Formatted Code
<img src="{site_url}/images/speck.gif" width="150" height="1" alt="">
 
 Quote

Status: offline

jonc

Forum User
Chatty
Registered: 09/12/04
Posts: 50
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.
 Quote

Status: offline

jonc

Forum User
Chatty
Registered: 09/12/04
Posts: 50
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.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by jonc: well I tried that first, but then the whole column collapses to about 35px wide which looks rediculous.
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?
 Quote

Status: offline

jonc

Forum User
Chatty
Registered: 09/12/04
Posts: 50
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.
Text Formatted Code
        <td width="100%" valign="top">

 


thanks a million Big Celebration
 Quote

All times are EDT. The time is now 10:53 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content