求助:想要在一个页面内列出所有文章的标题,请好心人帮忙
版主: seita
求助:想要在一个页面内列出所有文章的标题,请好心人帮忙
如题,由于不懂PHP,不了解typecho内部结构,只好求助,想要实现的效果参见: http://www.dbanotes.net/archives.html 先谢了。
Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙
汗,这个把模板改下就行了吧,就是archives.php那个模板,把日志内容相关参数删掉在稍微改动下css就OK了.......
Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙
代码: 全选
<?php if ($this->is('page', 'archives')): ?>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=9999')
->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
</ul>
</div>
<?php else : ?>
<?php $this->content(); ?>
<?php endif; ?>
Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙
@﹎‵sκyˊ☆ 已经用你的方法解决了,十分感谢
Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙
支持sky,确实可行。记下,已用
Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙
分享我的page.php
代码: 全选
<?php include('header.php'); ?>
<div class="grid_10" id="content">
<div class="post">
<h2 class="entry_title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
<div class="entry_data"><?php _e('作者:'); ?><?php $this->author(); ?> | <?php _e('发布时间:'); ?><?php $this->date('m月d日,Y年'); ?></div>
</div>
<?php if ($this->is('page', 'archive')): ?>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=9999')->parse('<li>{year}-{month}-{day}: <a href="{permalink}">{title}</a></li>'); ?>
</ul>
<?php else : ?>
<?php $this->content(); ?>
<?php endif; ?>
<?php include('comments.php'); ?>
</div><!-- end #content-->
<?php include('sidebar.php'); ?>
<?php include('footer.php'); ?>