写了一个左右不对称的专题模块,结果设置lazyload的时候死活算不出高度,准备修改成均匀的4栏,先备份一下这个左一右二的模板供参考。
<?php if ($this->options->PostTopic): ?>
<?php if ($this->options->AugLazy=="true"): ?>
<div id="topic" class="content-moudle" data-scale="0.5" data-lazyload="true">
<?php else:?>
<div id="topic" class="content-moudle" data-scale="0.5" data-lazyload="false">
<?php endif; ?>
<?php if ($this->options->TopicTitle): ?>
<?php $TopicTitle=explode("||", $this->options->TopicTitle); ?>
<div class="content-moudle-head"><h3><?php echo $TopicTitle[0]; ?></h3><i class="<?php echo $TopicTitle[1]; ?>" aria-hidden="true"></i></div>
<?php endif; ?>
<?php $myTopic_arr = explode("\r\n", $this->options->PostTopic); ?>
<?php $topicCount = 1; ?>
<?php foreach ($myTopic_arr as $item): ?>
<?php $itemSplit = explode("||" , $item); ?>
<?php $TopicCid = $itemSplit[0]; ?>
<?php $TopicImg = $itemSplit[1]; ?>
<?php $TopicDes = $itemSplit[2]; ?>
<?php $this->widget('Widget_Archive@'.$TopicCid, 'pageSize=1&type=post', 'cid='.$TopicCid) ->to($mytopic); ?>
<?php if ($topicCount==1): ?>
<div class="content-moudle-topic-l">
<a class="content-moudle-topic-link" href="<?php $mytopic->permalink(); ?>">
<img class="content-moudle-topic-img" src="<?php $this->options->themeUrl('user/'.$TopicImg); ?>">
<h3 class="content-moudle-topic-title"><?php echo $mytopic->title(); ?></h3>
<p class="content-moudle-topic-text"><?php echo $TopicDes; ?></p></a>
</div>
<?php elseif ($topicCount==2): ?>
<div class="content-moudle-topic-r">
<div class="content-moudle-topic-child">
<a class="content-moudle-topic-link" href="<?php $mytopic->permalink(); ?>">
<img class="content-moudle-topic-img" src="<?php $this->options->themeUrl('user/'.$TopicImg); ?>">
<h3 class="content-moudle-topic-title"><?php echo $mytopic->title(); ?></h3>
<p class="content-moudle-topic-text"><?php echo $TopicDes; ?></p></a>
</div>
<?php else:?>
<div class="content-moudle-topic-child">
<a class="content-moudle-topic-link" href="<?php $mytopic->permalink(); ?>">
<img class="content-moudle-topic-img" src="<?php $this->options->themeUrl('user/'.$TopicImg); ?>">
<h3 class="content-moudle-topic-title"><?php echo $mytopic->title(); ?></h3>
<p class="content-moudle-topic-text"><?php echo $TopicDes; ?></p></a>
</div>
<?php endif;?>
<?php $topicCount++; ?>
<?php endforeach; ?>
<?php if ($topicCount++ > 3): ?>
</div>
<?php endif;?>
</div>
<?php endif;?>