分页方法替换
This commit is contained in:
parent
099884dd4e
commit
915b7c1ab5
|
@ -23,27 +23,20 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul></fieldset>
|
</ul></fieldset>
|
||||||
</div>
|
</div>
|
||||||
<?php if (count($this->paginator)): ?>
|
<?php if (!empty($this->metadata)) : ?>
|
||||||
<div id='metacontent'>
|
<div id='metacontent'>
|
||||||
|
<h1>当前浏览:<?php echo $this->codename; ?></h1>
|
||||||
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
<hr />
|
<hr />
|
||||||
<?php
|
<?php foreach($this->metadata as $md) : ?>
|
||||||
$i=0;
|
<div class="mditem">
|
||||||
foreach ($this->paginator as $item):
|
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
|
||||||
$i++;
|
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
|
||||||
if (mb_strlen($item['description'])>700)
|
|
||||||
{
|
</h2>
|
||||||
$item['description'] = mb_substr($item['description'],0,400,'UTF-8').'...';
|
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
|
||||||
}
|
</div>
|
||||||
if($i%2==0) $style="style='background:#fafafa;'";
|
<?php endforeach; ?>
|
||||||
else $style="";
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
echo '<div class="mditem" '.$style.'>
|
|
||||||
<div class="thumb"><img src="/data/thumb/id/'.$item['id'].'" /></div>
|
|
||||||
<h2><a href="/data/'.$item['uuid'].'">'.$this->escape($item['title']).'</a>
|
|
||||||
</h2>
|
|
||||||
<p>'.$item['description'].'</p>
|
|
||||||
</div>';
|
|
||||||
endforeach;
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<?= $this->paginator; ?>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Reference in New Issue