A Wee Tiny Blog

Home || Downloads || Documentation || Change Log || License || Roadmap || Contact



 

Method: GetPageOfEntries

Parameters

page
The current page number
entriesPerPage
The number of entries on a page
sortByDate
Sort by date (true) or post ID (false)
ascendingOrder
Whether or not to sort the entries in ascending order (lowest value first)

Description

This function gathers a range of entries for creating pages like a newsfeed. For individual entries, you'll probably want to use GetEntry instead.

The last two parameters are simple booleans that control how the results are searched for or sorted. For chronological lists, set sortByDate to TRUE. Otherwise, the entries will be in order according to their post IDs.

When ascendingOrder is set to TRUE, the entries will also be sorted so that the lowest ID (or oldest date) is first. Most blogs default to newest first (or highest ID first), so you'll probably want to set this to FALSE most of the time. Another way to put it is that ascending order is 1, 2, 3 while descending order is 3, 2, 1.

Return value

If successful, this method returns an array of entry arrays.

Otherwise, an empty array is returned and the internal error flag is set.


 

Hosting generously provided by
Get A Wee Tiny Blog at SourceForge.net. Fast, secure and Free Open Source software downloads