CodeIgniter Forums
how to use parser element in if condition in client side - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to use parser element in if condition in client side (/showthread.php?tid=48227)



how to use parser element in if condition in client side - El Forum - 01-09-2012

[eluser]Unknown[/eluser]
i have done the follwoing thing...........
Code:
$data = array('left_menu_list' => $query->result(),
       'header' => $this->data['company_name'],
       'footer' => $this->data['footer'],
       'version' => $this->data['version'],
       'powered_by' => $this->data['powered_by'],
       'list_of_pages' => $listpage,
       'base_url' => base_url(),
       'list_page_heirarchal' => $listpage_heirarchical,
       'hiren' => "index"    
);

so to use {header},{footer},{hiren},etc.... In if condition in client side...
for example

Client Side Code....
if({hiren}== "index")
{

}

is there any way to write like this in client side...????


how to use parser element in if condition in client side - El Forum - 01-20-2012

[eluser]Unknown[/eluser]
hi chris,
i have seen your link and i found that it is much better then the CI Parser..

thanks for reply
Regards
Hiren Danecha



how to use parser element in if condition in client side - El Forum - 01-20-2012

[eluser]Bainzy[/eluser]
No problem glad it helped Smile