页码:
<?php $this->pageNav('上一页','下一页',10,'...'); ?>
面包屑:
您的位置: <a href="<?php $this->options->siteUrl()?>">挨踢谷</a> »
<?php if($this->is('category')):?>分类 » <?php $this->archiveTitle(' » ', '', '')?>
<?php elseif($this->is('tag')):?>标签 » <?php $this->archiveTitle(' » ','',''); ?>
<?php elseif($this->is('search')):?>搜索 <?php $this->archiveTitle(' » ','',''); ?>
<?php elseif($this->is('author')):?>作者 » <?php $this->archiveTitle(' » ','',''); ?>
<?php elseif($this->is('post')): ?><?php $this->category(' , ')?> »
<?php else: ?><?php $this->archiveTitle(' » ','',''); ?>
<?php endif; ?>
相关文章:
<?php $this->related(5)->to($relatedPosts); ?>
<ul>
<?php while ($relatedPosts->next()): ?>
<li><a href="<?php $relatedPosts->permalink(); ?>" title="<?php $relatedPosts->title(); ?>"><?php $relatedPosts->title(); ?></a></li>
<?php endwhile; ?>
</ul>
标签
<?php $this->tags(', ', true, 'none'); ?>
分类和页面
<?php $this->widget('Widget_Metas_Category_List')->parse('<li><a href="{permalink}" title="{description}">{name}</a></li>'); ?>
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while($pages->next()): ?>
<li<?php if($this->is('page', $pages->slug)): ?> class="hover"<?php endif; ?>><a href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a></li>
<?php endwhile; ?>
所有标签
<?php $this->widget('Widget_Metas_Tag_Cloud')->to($taglist)?><?php while($taglist->next()): ?><li><a href="<?php $taglist->permalink(); ?>"><?php $taglist->name()?></a></li><?php endwhile?>
页面判断和分类页显示分类信息:
<?php if($this->is('category')):?>
<?php $cate = $this->getPageRow()?>
<div id="itguu_tooltip">正在显示<span><a href="<?php echo $cate['permalink']?>"><?php echo $cate['name']?></a></span>分类下的内容</div>
分类页面使用 $this->categories[0]获取信息
上下篇
<?php $this->thePrev('%s', "<a href=\"javascript:alert('你看得文章已经是最旧的,没有上一篇了')\" title=\"没有上一篇了\">没有上一篇了</a>"); ?>
<?php $this->theNext('%s', "<a href=\"javascript:alert('您看的文章已经是最新的了')\" title=\"没有下一篇了\">没有下一篇了</a>");?>
Archive提示
<?php if($this->is('category')):?>
<?php if(isset($this->categories[1])):?>
<?php $cate = ($this->categories[count($this->categories)-1]);?>
<div id="itguu_tooltip">正在显示<span><a href="<?php echo $cate['permalink']?>"><?php echo $cate['name']?></a></span>分类下的内容</div>
<?php else:?>
<div id="itguu_tooltip">正在显示<span><?php $this->category()?></span>分类下的内容</div>
<?php endif?>
<?php elseif ($this->is('tag')):?>
<div id="itguu_tooltip">正在显示带有<span><?php $this->archiveTitle(' » ', '', '')?></span>标签的内容</div>
<?php elseif($this->is('search')):?>
<div id="itguu_tooltip">搜索<span><?php $this->archiveTitle(' » ','','')?></span>的结果</div>
<?php elseif($this->is('author')):?>
<div id="itguu_tooltip">正在显示署名<span><?php $this->author->screenName()?></span>的文章</div>
<?php endif?>
在post页面中输出循环输出菜单时,使用$this->row['category']; 与 $cate->slug判断,然后应用 current之类的效果
<?php $this->widget('Widget_Metas_Category_List')->to($cate); ?>
<?php while($cate->next()): ?>
<li<?php if($this->is('category', $cate->slug) || ($this->is('post') && $this->row['category'] == $cate->slug)): ?> class="current"<?php endif; ?>><a href="<?php $cate->permalink(); ?>" title="<?php $cate->description(); ?>"><?php $cate->name(); ?></a></li>
<?php endwhile; ?>
Typecho header函数参数<?php $this->header("generator=&template=&commentReply=&pingback=&xmlrpc=&wlw=&rss1=&rss2=&atom=&keywords=&description=")?>
显示指定分类
<?php
$this->widget("Widget_Archive@$category->mid",'type=category', "mid=1" )->parse('<h1><a href="{permalink}">{title}</a></h1><p>{text}</p>'); ?>
注意是否需要美元符号!
同一一面多次调用的时候,请注意更改@后面的变量,如category->slug。