求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

模板开发以及发布测试

版主: seita

回复
blire
帖子: 11
注册时间: 2009年 12月 26日 16:17
联系:

求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 blire »

如题,由于不懂PHP,不了解typecho内部结构,只好求助,想要实现的效果参见: http://www.dbanotes.net/archives.html 先谢了。
gengsu
帖子: 8
注册时间: 2010年 1月 25日 14:11

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 gengsu »

汗,这个把模板改下就行了吧,就是archives.php那个模板,把日志内容相关参数删掉在稍微改动下css就OK了.......
头像
ClayMore
帖子: 2481
注册时间: 2007年 11月 29日 02:55
来自: Sleeping Forest
联系:

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 ClayMore »

代码: 全选

         <?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; ?>
zhangxh
帖子: 30
注册时间: 2010年 2月 4日 13:18
联系:

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 zhangxh »

都是牛逼的人呢 ..
blire
帖子: 11
注册时间: 2009年 12月 26日 16:17
联系:

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 blire »

@gengsu 仍然谢谢
blire
帖子: 11
注册时间: 2009年 12月 26日 16:17
联系:

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 blire »

@﹎‵sκyˊ☆ 已经用你的方法解决了,十分感谢
adqin1984
帖子: 49
注册时间: 2010年 1月 28日 09:03
联系:

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 adqin1984 »

支持sky,确实可行。记下,已用
CycloN
帖子: 40
注册时间: 2009年 8月 13日 21:55
联系:

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 CycloN »

收藏
kesor
帖子: 109
注册时间: 2008年 2月 3日 19:53
联系:

Re: 求助:想要在一个页面内列出所有文章的标题,请好心人帮忙

帖子 kesor »

分享我的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'); ?>
回复