Linux 软件免费装

Table of Content

开发者 Ulrich Kautz
更新时间 2011年3月7日 03:55
PHP版本: 2.7 及以上
WordPress版本: 3.1.0

标签

sitemap index table of contents toc pageindex siteindex

下载

详情介绍:

The Plugin generates a TOC for a page or an article or just a part of either. The TOC is a Multi-Level List with links to "anchors" on the page. Therefore it parses the given page (or the part of page you want it to parse) and looks for headlines (h1, h2, h3, ...) in it. From the found it buils the TOC. It also upgrades your page contents with a top-navigation after each found headline .. The most likely usecase for this Plugin is a huge page or article which you dont want to put into multiple pages.

安装:

Either: CAUTION Dont use a structure like h2, h1, h3, h1 .. it doesnt have to be ordered, but at least decrementing!

升级注意事项:

0.6.6
  • You can now use the add_filter method with this plugin. Also a type in a stylesheet class has been fixed (pni-navigtion -> pni-navigation).

常见问题:

Can i disable the "^" markers in the headlines ?

Yes, via stylesheet, like so: .pni-content .toplink { display: none ! important }

Can i change the list number style ?

Yes, also via stylesheet. For using decimals in all instances (level1, level2, ..): .pni-navigation ol li { list-style-type: decimal ! important } Or to use discs (non-numeric), change the style like so: .pni-navigation ol li { list-style-type: disc ! important } See http://www.w3schools.com/css/pr_list-style-type.asp for more info

Can i use this plugin in with add_filter ?

Yes. The following example shows how you can add the TOC as a filter to the_content, which will auto-use the TOC in any of your posts. Therefore add the following at the end of the functions.php file of your theme: if ( function_exists( 'toc_filter' ) && ! function_exists( 'theme_toc_filter' ) ) { function theme_toc_filter( $content = "" ) { return toc_filter( $content ); } add_filter( 'the_content', 'theme_toc_filter' ); } If you use other content modifying plugins and your short-codes get messed up, try to adjust the priority higher (eg: add_filter( 'the_content', 'theme_toc_filter', 999 ) or even higher). If you need to disable the TOC in a single page of your theme, you can define the 'DISABLE_TOC' constant with a true value: define( 'DISABLE_TOC', true );

更新日志:

0.6.6, 2011-03-06 0.6.5, 2010-10-28 0.6.4, 2010-10-26 0.6.3, 2010-10-25 0.6.2, 2010-10-23 0.6.1, 2010-10-23 0.6.0, 2010-10-22 0.5.2, 2010-07-04 0.5.1, 2010-07-04 0.5, 2010-06-21 0.4.2, 2010-05-17 0.4, 2009-09-17