Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Content without summary

Started by Muut Archive 11 years ago · 2 replies · 932 views
11 years ago

if I do page.content, it's also printing the page.summary. I don't want that. How can I avoid it?

11 years ago

There is no built in way, but it can be done pretty easily with Twig (which gets compiled into PHP so it's still fast):

TWIG
{% set content = page.content|slice(page.summary|length) %}

Then just output {{ content }}

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1326 9 years ago
Archive · by Muut Archive, 9 years ago
2 920 9 years ago
Archive · by Muut Archive, 9 years ago
2 4049 9 years ago
Archive · by Muut Archive, 9 years ago
1 2927 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago