[eluser]behnampmdg3[/eluser]
Hi;
I use the code below and show the results in view no problems:
Code:
$posts_data=$this->blogs->list_posts($record_start);
$data_body = array( 'posts'=>$posts_data['posts']);
$this->parser->parse('home', $data_body);
And in View:
Code:
{posts}
<a class="posts_link" href="{url}blog/content/{BLOG_ID}">{BLOG_TITLE}</a> ({CATEGORY_TITLE})<br />
{/posts}
I was wondering how I can add a counter to this list that shows numbers from 1 to .... Something like:
Code:
{posts}
{counter}<a class="posts_link" href="{url}blog/content/{BLOG_ID}">{BLOG_TITLE}</a> ({CATEGORY_TITLE})<br />
{/posts}
I can easily do it with <?php echo $counter++;?> in view but I don't want to have php tags in my view.
Thanks