我把templates\summary\index.template文件复制了一份,改名为hot.template,然后只保留了最活跃的博客那一块,
然后同时把summary.php也复制了一份,改名为hot.php
我想在访问hot.php时调用显示hot.template这个模板应该该哪里???(默认是调用显示index.template)
我的目的就是想做个单独的最活跃博客列表
这样做的话显示正常 可以读出最活跃列表,但是hot.php读的是index.template,我把index.template改为hot.template
然后想让hot.php读hot.template要改哪个文件?
代码:
hot.php<?php
if (!defined( "PLOG_CLASS_PATH" )) {
define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
}
include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
include_once( PLOG_CLASS_PATH."class/summary/controller/summarycontroller.class.php" );
include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
include_once( PLOG_CLASS_PATH."class/misc/version.class.php" );
include_once( PLOG_CLASS_PATH."class/net/http/session/sessionmanager.class.php" );
define( "SUMMARY_DEFAULT_BLOGS_PER_PAGE", 25 );
SessionManager::init();
$controller = new SummaryController();
$controller->process( HttpVars::getRequest());
?>
index.template{assign var=activeBlogs value=$summaryStats->getMostActiveBlogs()}
{if $activeBlogs}
<ul class="itemList">
{foreach from=$activeBlogs item=blog}
{assign var="url" value=$blog->getBlogRequestGenerator()}
<li class="item"><a target='blank' href="{$url->blogLink()}">{$blog->getBlog()|strip_tags|utf8_truncate:24}</a></li>
{/foreach}
</ul>
{/if}