1 blogmeister Dec 30, 2008 22:15
3 blogmeister Jan 02, 2009 21:37
Thanks for your reply, Walter.
If you would please, can you provide an example on how to use that class - say, to create a result set of posts (items) and the blog each belongs to?
Thanks.
4 waltercruz Jan 05, 2009 14:27
You can open a skin and see the methods in action.. A sample:
while( $Item = & mainlist_get_item() )
{
// now you will have a Item, a blog posts, with a lot of methods:
$Item->title();
// Display CONTENT:
$Item->content_teaser( array(
'before' => '',
'after' => '',
) );
$Item->more_link( array(
'before' => $params['before_more_link'],
'after' => $params['after_more_link'],
'link_text' => $params['more_link_text'],
) );
$Item->content_extension( array(
'before' => '',
'after' => '',
) );
// Links to post pages (for multipage posts):
$Item->page_links( '<p class="right">'.T_('Pages:').' ', '</p>', ' · ' );
}
Open some skin, open _item_content.inc.php and enjoy! You can use the online docs, on http://docs.b2evolution.net
5 blogmeister Jan 08, 2009 12:34
Thanks for the info, Walter.
I'll give it a try.
You want to use SQL? You can use the itemlist class and a Iterator...
But, if you want to make raw queries, turn on the debug and you will see the queries in the footer!