开发者

drupal---views--add big space to the li list result

now, i used views module getting all the site's articles list, to make the result list conveniently to read. i want to add a big space after 10 line,20line,30line..... how to开发者_JS百科 add the label after the 10line,20 line,...... how to overwrite the views output result. thank you.


off the cuff:

in views-view-list--viewname.tpl.php

 <?php foreach ($rows as $id => $row): ?>
  <li class="<?php print $classes[$id]; ?>"><?php print $row; ?></li>
<?php endforeach; ?>   

turns into something like:

<?php $count = 0 ?>
<?php foreach ($rows as $id => $row): ?>
  <?php $count++ ?>
  <?php if($count == 10): ?> 
    <li class="<?php $classes[$id]; ?> big_space"><?php print $row; ?></li>  
  <?php else:
    <li class="<?php $classes[$id]; ?>"><?php print $row; ?></li>
  <?php endif; ?>
<?php endforeach; ?>   

in your css:

.big_space {margin-bottom: 50px;}

Untested, but you get the idea.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜