Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Getting most recent pages from all categories from site


Reply


3 Posts   1532 Views

Avatar
S0crates9

27 Posts

11 May 2009 at 5:57am

So I am trying to basically grab 1-2 of the most recent pages from three+ navigation categories and display them as links with perhaps a short "teaser" of text all on the homepage. How do I go about writing this?

Example:

Mysite.com has categories:
News
Weather
Jokes
Blog
Comments

and the homepage should have a section called "Recent Entries" which displays up to 10 of the recent pages, equally balanced across all categories.

Thanks in advance for any help on this!

Avatar
S0crates9

27 Posts

15 May 2009 at 12:17pm

Anyone have any ideas on how to get this done?

Avatar
Bambii7

Community Member, 254 Posts

19 July 2010 at 1:46pm

This article explains it.

http://doc.silverstripe.org/recipes:displaying_five_latest_pages_from_multiple_pagetypes