• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to access smarty functions in template using CodeIgniter?

Hello guys just need a little help here.
I have a difficulty in accessing smarty function in my template. Here's my sample code.

class Category_Controller extends CI_Controller{
     public function __construct(){
     public function index(){
      $title = "Welcome to my page!";
      $category = $this->category_model->getAllCategory();
      $category_data = $category->result_array();

My Template 

       <td>SALES CATEGORY ID</td>
       <td>SALES CATEGORY NAME</td>
       {assign var = x value = ''}
       {assign var = y value = ''}
       {foreach $category as $x}
         <td>{$x['salescatname'] | count_characters}</td>
     {$smarty.now |date_format:'%Y-%m-%d %H:%M:%S'}

I have a smarty error in the output. In my code I need to count the salescatname and display the output in the table also. And below. I need to post the date. But how can I access functions?

That's all thanks in advance.


giup viec nha uy tin giúp việc nhà | giúp việc nhà chuyen nghiep nhat  giup viec nha hieu qua nhat tim nguoi giup viec cong nhan nhat tìm người giúp việc duoc thanh cong nhat son epoxy that la bai phuc thi cong son epoxy ket qua cao nhat dich vu ve sinh thanh qua cao nhat dịch vụ vệ sinh thang nay gioi vay giup viec ngay tet chung ta nen doan ket giup viec ngay tet ngay hom nay la ngay may giúp việc ngày tết chung ta toi noi roi rem cua hieu qua cua chung minh rèm cửa cong nhan ngay ay son sua nha chung no that la dep dang tin rao vat phai that la ne phuc đăng tin rao vặt

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.