Mecha CMS

Mecha CMS blog and documentation.

Manual Post Excerpt

Updated: Sunday, 07 August 2016

Creating article/page excerpt manually.

Users now can make their own article/page excerpt by adding a <!-- cut --> symbol after the paragraph they want to cut:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

<!-- cut -->

Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

The article/page excerpt will be available in $article->excerpt and $page->excerpt.

In the full page mode, the <!-- cut --> symbol will be replaced by a <span> element with ID more:%s like this:

<span class="fi" id="more:1410687445" aria-hidden="true"></span>

In version 1.1.3, it is also possible to append a jump link at the end of article/page excerpt automatically by adding a plus sign just after the cut:

<!-- cut+ -->

Custom jump link text can be created with this way:

<!-- cut+ "Details..." -->

Related: Conditional Excerpt

Donation and Email Subscription