eZ Community » Forums » Setup & design » Block in front page
expandshrink

Block in front page

Block in front page

Friday 07 February 2014 4:14:05 pm - 4 replies

 

Hi,

I added a new block in front page. Here is my modified template ( extension/ezflow/design/toto/override/templates/block/5_items5.tpl) :

 {def $valid_nodes = $block.valid_nodes
     $sorted_nodes = array(0,1,2,3,4)
     }
{foreach $valid_nodes as $tmp}
        {set $sorted_nodes = $sorted_nodes|remove($tmp.priority,1)}
        {set $sorted_nodes = $sorted_nodes|insert($tmp.priority,fetch('content','node',hash('node_id',$tmp.node_id)))}
{/foreach}
<div class="block-type-3items block-view-{$block.view}">
        <!-- BLOCK: START -->

        <!-- BLOCK BORDER INSIDE: START -->

        <!-- BLOCK CONTENT: START -->
        <div class="columns-two">
          <div class="col-1">
                <div class="row-1">
                  <div class="col-content">
                    {node_view_gui view='block_item' image_class='block5items5' content_node=$sorted_nodes[0]}
                  </div>
                </div>

                <div class="row-2">
                    <div class="col-content">
                      {node_view_gui view='block_item' image_class='block5items5' content_node=$sorted_nodes[1]}
                    </div>
                    <div class="col-content">
                      {node_view_gui view='block_item' image_class='block5items5' content_node=$sorted_nodes[2]}
                    </div>
                </div>
        </div>

          <div class="col-2">
                <div class="col-content">
                  {node_view_gui view='block_item' image_class='block5items5' content_node=$sorted_nodes[3]}
                </div>
          </div>

          <div class="col-1">
                <div class="row-1">
                  <div class="col-content">
                    {node_view_gui view='block_item' image_class='block5items5' content_node=$sorted_nodes[4]}
                  </div>
                </div>
          </div>

        </div>

        </div>

        <!-- BLOCK CONTENT: END -->

        <!-- BLOCK BORDER INSIDE: END -->

        <!-- BLOCK: END -->

</div>

{undef $valid_nodes $sorted_nodes}

I have a space between node0 and node1/node2 (but not from node1/node2 and node4). How can I remove it ?

Thanks for your help.

Sunday 09 February 2014 5:23:20 am

You might want to use Firebug, or Firefox's Inspect Element.

I suspect it is a CSS issue or tag mismatch.

Monday 10 February 2014 9:15:20 am

I use them but I can't detect where is my mismatch. I'll persevere. Thanks.

Monday 10 February 2014 1:16:06 pm

It might also be a content issue, where the blank line is in the content.

Monday 10 February 2014 3:38:30 pm

Yes, that was I supposed, but, unfortunately, not. For the moment, I bypassed it by adding another line beetween col-2 and col-1 in my template 5_items5.tpl :

 <td>
<img src={"my_image.png"|ezimage}>
</td>
expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from