Home  >  Article  >  Backend Development  >  SegmentFault

SegmentFault

WBOY
WBOYOriginal
2016-06-06 20:52:281093browse

回复内容:

虽然我不建议你修改路由表,但是你要这么做的话,还是很容易的,在Helper中提供了很多实用的方法,其中addRouteremoveRoute两个方法结合就能实现你的需要,比如要实现你说的分类样式/category-default.html,可以这样

Helper::removeRoute('category');
Helper::addRoute('category', '/category-[slug].html', 'Widget_Archive', 'render');

如果你要修改分页

Helper::removeRoute('category_page');
Helper::addRoute('category_page', '/category-[slug]-[page:digital].html', 'Widget_Archive', 'render');

当然,在做这些操作的时候,强烈建议你先备份好数据库。

感谢70胸,我是小白。能否,详细告诉我一下,应该如何操作呢?
例如,修改哪个文件?
同样期待typecho未来走的更好,近期已经利用typecho制作了很多网站了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn