Plugin

Archived
Forum
(read-only)

Column-bo

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Protean Web

     

Adding a blank middle column between two content columns?

Support Request

misteraven
misteraven

Hi,

Wondering if its possible to create an empty spacer column between two content columns with tables (3 column layout)?

I’ve created a two column table with channel content in each. Now I’m looking to add an extra column between both thats really just for spacing. When I try and loop it, everything I do, turn this into 4 columns (content, space, content, space). Seem like something like EE’s backspace=”” tag would be helpful in this situation.

Anyhow, here’s the block of code I’m working with (kinda intricate, but its being used to feed HTML into an automated newsletter script)...

{exp:columnbo:table columns="2" delimiter="|" direction="horizontal" overflow="table" table_open="<tr><td><table border='0' cellpadding='0' cellspacing='0' width='100%'>" cell_start="<td align='center' class='clear-both' valign='top' width='300'>" cell_end="</td>" table_close "</table></td></tr>" tbody_open="" tbody_close=""}
                            
<?php $start_time 
ee()->localize->format_date('%Y-%m-%d %H:%i'ee()->localize->now 561600); ?>
{exp
:channel:entries channel="news" start_on="<?php echo $start_time; ?>" limit="8" rdf="off" dynamic="off" orderby="view_count_one" sort="desc" backspace="5"}
                                    
    
<table border="0" cellpadding="0" cellspacing="0" width="100%">
     <
tr>
            <
td align="center">
          <
a href="/{categories}{category_url_title}{/categories}/{url_title}" target="_blank">
                    <
img alt="" height="192" src="{news_thumb}" style="display:block;border:1px solid #999999;" width="300">
          </
a>
            </
td>
     </
tr>
     <
tr>
            <
td height="10" style="font-size:0px; line-height:0px;">&nbsp;</td>
        </
tr>
        <
tr>
            <
td class="sp" style="font-family:Helvatica, Arial, sans-serif; color:#555555; text-align:left; font-weight:bold; font-size:16px;">
             <
a href="/{categories}{category_url_title}{/categories}/{url_title}" style="text-decoration:none; color:#555555;" target="_blank">{title}</a>
            </
td>
        </
tr>
        <
tr>
   <
td height="18" style="font-size:0px; line-height:0px;">&nbsp;</td>
  </
tr>
 </
table><td class="clear-both" height="18" width="27">&nbsp;</td>|
                                    
{/exp:channel:entries}                                  
{
/exp:columnbo:table} 

Appreciate any assistance. Thanks!

misteraven
# 1
misteraven

Sorry, still stuck on this.

Any suggestions or assistance would be greatly appreciated.

Thank you.

jayalfredprufrock
# 2
Developer
jayalfredprufrock

Sorry for the late reply, I don’t really support these old EE extensions anymore. Is there a way to indicate that some where?

To your question, I’m not entirely sure I understand what you are trying to accomplish, but would something like this work? (I’ve simplified the code a bit…)

{exp:columnbo:table columns="4" delimiter="|" direction="horizontal" overflow="table"}
{exp
:channel:entries limit="8"}
<table><tr><td>{title}</td></tr></table>|<table class="empty-table"><tr><td>&nbsp;</td></tr></table>|
{/exp:channel:entries}
{
/exp:columnbo:table} 

This should produce a table with nested alternating content/empty tables.

If you only wanted a single empty column in between two content columns (3 column layout) you could do something like this:

{exp:columnbo:table columns="3" delimiter="|" direction="horizontal" overflow="table"}
{exp
:channel:entries limit="8" backspace="61"}
<table><tr><td>{title}</td></tr></table>|<table class="empty-table"><tr><td>&nbsp;</td></tr></table>|
{/exp:channel:entries}
{
/exp:columnbo:table} 

This just uses the backspace feature to remove the last trailing table and delimiter. None of this is actually tested but hopefully it gives you an idea. Good luck!

Andrew