Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Blog entry by newest (date)

 

 


soj
User

Apr 17, 2008, 6:50 PM

Post #1 of 3 (161 views)
Shortcut
Blog entry by newest (date) Can't Post

How might I display only the latest blog entry in, say, my index.php (as opposed to the pageList.php, etc)?

Would the following or some version of work?


Code
$options['where']     = 'fieldname = 'date DESC';


TIA! soj


Dave
Staff / Moderator


Apr 18, 2008, 8:42 AM

Post #2 of 3 (151 views)
Shortcut
Re: [soj] Blog entry by newest (date) [In reply to] Can't Post

Close, you don't need the fieldname = part though. So it looks like this, and if you only want the latest (1 entry) we'll add a setting for that as well:


Code
$options['orderBy'] = 'date DESC'; 
$options['perPage'] = '1'; // show 1 record
$options['pageNum'] = '1'; // from first page only
$options['where'] = '1'; // to ignore search options


Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com


soj
User

Apr 18, 2008, 11:29 AM

Post #3 of 3 (149 views)
Shortcut
Re: [Dave] Blog entry by newest (date) [In reply to] Can't Post

Perfect, TUVM!

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4