A Wee Tiny Blog

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


Method: NavigationAids


The current page number
The number of entries on a page
Sort by date (true) or post ID (false)


In an effort to be helpful, A Wee Tiny Blog objects can generate an array containing the IDs of the other entries you may wish to link to. For example, you'll probably want to include "next" or "previous" links on your pages so that your readers can go from one entry to another.

There is a catch however: in order for this method to work, you must first retrieve an entry using a method like GetEntry or GetPageOfEntries before you call NavigationAids. This is because NavigationAids usually needs to know what the current date is, and those methods record that information behind the scenes.

If you used GetPageOfEntries, things are actually easier: just pass this method the first three parameters you used for GetPageOfEntries. Otherwise, set page to the current entry ID and entriesPerPage to 1.

Return values

This method always returns an associative array containing the IDs of other entries and a flag to indicate if it was successful or not. If there isn't a target for a given link, it will be set to -1.

The array has the following fields:

The ID of the oldest entry or page
The ID of the previous entry or page
The ID of the next entry or page
The ID of the newest entry or page
TRUE if an error was encountered, FALSE normally


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