We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    I am using this tpl for generating content, I want the text block to be just as heigh as the image. The code I use forces a text block even if there is no text, creating a space between the first and the following block. I need a way to disable min-height:511px if the +cell_
    n_content
    is empty?
    Probably easy, but not for me.

    <div class="six columns inline">
            <div class="columns inline left">
    			<img src="[[+cell_1_image:phpthumbof=`w=511&h=511&zc=1`]]"  alt=""/>
    				<div style="max-width:511px;min-height:511px;padding:25px 5px 5px 15px;background:#[[+cell_1_color]]">[[+cell_1_content]]
    				</div>
    		</div>
    	</div>
    		<div class="six columns inline right">
    			<div class="columns inline">
                 <img src="[[+cell_2_image:phpthumbof=`w=511&h=511&zc=1`]]"  alt=""/>
    				<div style="max-width:511px;min-height:511px;padding:25px 5px 5px 15px;background:#[[+cell_2_color]]" [[+cell_2_content]]
    				</div>
    			</div>
            </div>
    

    This question has been answered by franklos. See the first response.

    [ed. note: franklos last edited this post 11 years, 4 months ago.]
    • discuss.answer
      • 10076
      • 1,024 Posts
      Found it, used an output filter, works brilliant:

      <div class="row">
      <div class="six columns inline">
          <div class="columns inline left">
       [[+cell_1_content:is=``:then=`<img src="[[+cell_1_image:phpthumbof=`w=511&h=511&zc=1`]]"  alt=""/>`:else=`
                  <div style="max-width:511px;min-height:511px;padding:25px 5px 5px 15px;background:#[[+cell_1_color]]"[[+cell_1_content]]</div>`]]
      	</div>
      </div>
      
      <div class="six columns inline right">
      	<div class="columns inline">
       [[+cell_2_content:is=``:then=`<img src="[[+cell_2_image:phpthumbof=`w=511&h=511&zc=1`]]"  alt=""/>`:else=`
                  <div style="max-width:511px;min-height:511px;padding:25px 5px 5px 15px;background:#[[+cell_2_color]]"[[+cell_2_content]]</div>`]]
      	</div>
      </div>
      </div>