-
Notifications
You must be signed in to change notification settings - Fork 7
Usage
jfox015 edited this page May 15, 2012
·
1 revision
- By default you can browse to http://www.yourwebsite.com/news/ to view a list of published articles.
To add a block of news articles with for display on a landing page and specify the article count to display and the starting index count, use:
$this->load->controller('news');
$this->news->get_articles($count,$startIndex);
OR
modules::run('news/get_articles',$count,$startIndex));
To display a listing of news titles with links, which can also accept and article count and start index, use:
$data['articles'] = modules::run('news/get_article_list',$count,$startIndex);
Template::set('news_list',$this->load->view('news/news_list',$data, true));