Skip to content
● Grav 2.2.19 and 1.7.53.8 are out with security fixes found by Anthropic's OSS Scanner: update your sites. Read more →

Is it a way to get the "content - summary" in a twig template ?

Started by FrViPofm 2 months ago · 4 replies · 633 views
2 months ago

Hi,
Trying to make a carousel, my question is "how can I use the best with the content". My idea is to split the content with === for getting easily a summary that can be the opening generic as a first slide, and the part after the `===` for the credits. The images are in page.media or in an array in the header.

Is it a way to get the end of the markdown, the content - summary or at least, to get the pure markdown of them to make the difference ?

Thanks for your suggestions.

last edited 09/20/26 by FrViPofm
2 months ago

Not sure what you are trying to achieve... A carousel shows multiple media files. How would you store the summary and credits for each image in the content of a page?

Did you have a look at Metafiles

1 month ago

The carrousel has a master page with medias. We can get the whole content of the page with page.content, we can get the summary from the content with page page.summary. But is it a way to get the end of the content : kind of page.content - page.summary ?

1 month ago

Not trying to flame you, but I'm still confused... You want the content of a page without the summary? In that case, what has "carousel" got to do with the question...

Anyway...

  • Have you searched for "content without summary" here on the forum?
    Then first hit suggests a solution mentioned in the cookbook section of the documentation.
  • Have you searched for "content without summary" on the documentation site?
    First hit also points to a possible solution in the cookbook.

Does the solution work for you?

last edited 09/25/26 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by TomW, 1 week ago
1 156 7 days ago
Themes & Styling · by AH, 1 week ago
0 135 1 week ago
Themes & Styling · by johan thomas, 5 years ago
1 939 1 month ago
Themes & Styling · by stuart young, 3 months ago
3 796 3 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 829 3 months ago