如题。下面具体举例,希望大家看看
在网站下面新建几个问题分类:
文章分类:news/category-fashion
文章分类下的分页:news/page-2 (错误的)
正确的分类应该是:news/category-fashion/page-2
[size=13]经过检查是本身程序就有这个问题,在不开启伪静态的情况下是一样的[/size]
文章列表分页是下面的代码:
views/default/article/square.tpl.htm
<?php echo $this->pagination; ?>
app/article/main.php
TPL::set_meta('description', $meta_description);
}
TPL::assign('article_list', $article_list);
TPL::assign('article_topics', $article_topics);
TPL::assign('hot_articles', $this->model('article')->get_articles_list(null, 1, 10, 'votes DESC', 30));
TPL::assign('pagination', AWS_APP::pagination()->initialize(array(
'base_url' => get_js_url('/article/' . $_GET['category_id'] . '' . $_GET['feature_id']),
'total_rows' => $article_list_total,
'per_page' => get_setting('contents_per_page')
))->create_links());
views\default\config\pagination.php
<?php
$config = array(
'first_link' => '<<',
'next_link' => '>',
'prev_link' => '<',
'last_link' => '>>',
'uri_segment' => 3,
'full_tag_open' => '<div class="page-control"><ul class="pagination pull-right">',
'full_tag_close' => '</ul></div>',
'first_tag_open' => '<li>',
'first_tag_close' => '</li>',
'last_tag_open' => '<li>',
'last_tag_close' => '</li>',
'first_url' => '', // Alternative URL for the First Page.
'cur_tag_open' => '<li class="active"><a href="javascript:;">',
'cur_tag_close' => '</a></li>',
'next_tag_open' => '<li>',
'next_tag_close' => '</li>',
'prev_tag_open' => '<li>',
'prev_tag_close' => '</li>',
'num_tag_open' => '<li>',
'num_tag_close' => '</li>',
'display_pages' => TRUE,
'anchor_class' => '',
'num_links' => 3
);
阅读全文
收起全文