GetSimple Support Forum

Full Version: How to get the latest pages?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to get the latest pages sort by pubdate or modified-time?
Ben Wrote:How to get the latest pages sort by pubdate or modified-time?

if you want to use GS like a blog, try the dominion blog plugin,

http://get-simple.info/extend/plugin/dom...ognews/45/
Ben Wrote:How to get the latest pages sort by pubdate or modified-time?

I'm also interested in this, working on it...
Ben Wrote:How to get the latest pages sort by pubdate or modified-time?

The I18N Search plugin can return the search results ordered by the pubDate. But it requires at least one search criterium (tag/keyword or word).

Otherwise you need to read all pages' XML files, extract the pubDate, convert it to a sortable format (e.g. UNIX timestamp) and use it to order the pages.
http://www.cyberiada.org/cnb/getsimple-p...ent-pages/
very simple for now.
demo in sidebar.

Edit:
TO-DO:
- select by keyword/tag
- easier way to customize output (with a component...?)
- select a different datetime field (e.g. i18customfields' creDate)
...
Carlos Wrote:http://www.cyberiada.org/cnb/getsimple-p...ent-pages/
very simple for now.
demo in sidebar.

Hi Carlos, step by step a new feature grows ;=)

I have one suggestion:

use stripslashes() to un-escape the apostrophes, Carlos\' => Carlos'
Thanks, cool plugin
0.1.1 beta - Fixed slashes issue (thanks Connie)
There's a small issue with the Pages plugin, it doesn't update the page index when you change anything (edit, delete page...) until you save a page again.

Edit: this issue was fixed in Pages plugin version 2.2 and later.
0.1.2 fix: private pages no longer shown.
Loving your plugin, just what I need for a current project. You rock! \m/
Thanks,Carlos
Happy to see this "quickie" is useful to some.
Will improve, make it easier and add some features (when I have the time).

For now, I've released an update, 0.2 beta, to make it compatible with the new PagesXML ("Page caching") 2.3 available in Extend.

Recent Pages plugin

This Recent Pages update is not compatible with Pages 2.2 or older, so if you upgrade, do it with both of them.
Carlos,

just installed Recent Pages, it works a treat (GS 3.0, Page Caching 2.3, included in page by way of DynPages 0.7.1). Thanks a lot!
Recent Pages plugin updated, version 0.2.1. Minor update (to work with pubDateFix plugin): pages with publication date set in the future will not be listed (until then), so you can schedule publication of pages.
If you want this script to work with GS 3.1 beta (instead of GS 3.0), edit recentpages.php and replace:
Code:
$digi_pagesArray
by:
Code:
$pagesArray
(5 occurrences in lines 43 to 47)