Hi Jean.
Yes, you can retrieve content from your custom pages too. I see two
possibilities:
- If your desired page structure allows it, you can create the pages
from which you want to pull the content as children of the page that
will show the snippets. This way the child pages are accessible in the
parent page as page.children, and you can use the truncatewords filter
or the description field as others have explained.
- For a more flexible solution, you can create a template tag that loads
your custom pages into the context (something modeled after Mezzanine's
own blog tags). Again, you're then able to display the content as you like.
As a side note, I don't know if the example model you provided in your
previous reply is what you're actually using, but it's worth saying that
anything that inherits from Page or Displayable already has a
publish_date field, and anything that inherits from RichText already has
a content field; so declaring those is not necessary.
--
You received this message because you are subscribed to the Google Groups "Mezzanine
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.