Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Page with or without summary
· 10 years ago
Yup, please add this issue here https://github.com/getgrav/grav/issues
-
Page with or without summary
· 10 years ago
I'd still suggest creating an issue in the main repo. This really shouldn't require a custom plugin to solve.
-
Page with or without summary
· 10 years ago
The solution was tested and works. The recipe goes like this. Create a plugin named "HasSummary" by following steps 1 and 2 of the Plugin Tutorial. Replace the function onPageContentRaw() by the fol
-
Page with or without summary
· 10 years ago
@samuele, Please check your messages, see the message button. Please test that solution. If it helps we can let everyone know about it.
-
Page with or without summary
· 10 years ago
Seems to me the real problem is that the summary function returns the full page content if there is no explicit summary. While changing this would harm backwards compatibility, returning nothing if th
-
Page with or without summary
· 10 years ago
I cannot slice summary because some pages have no summary diveder in markdown file. If summary_size property of the Page class were public, I would be able to know if there is summary in markdown (the
-
Page with or without summary
· 10 years ago
Might this recipe "Displaying page content without summary" be the answer you are looking for?
-
Page with or without summary
· 10 years ago
No, in second .md, where there is no summary, if I use page.content|slice(page.summary|length), the first part of content is truncated.
-
Page with or without summary
· 10 years ago
You have to manually splice the content. Just ignore the first part of content that's the same length as the summary. In PHP, it would be something like substr($page->content, strlen($page->summ
-
Page with or without summary
· 10 years ago
This is my md files: first md: there is a summary Summary of news 1 === Summary of news 1. (there could be the same text of the summary) Content of news 1. Lorem ipsum dolor sit amet, consectetur