goFrendiAsgard / No-CMS

No-CMS, A CodeIgniter Based CMS Framework
300 stars 199 forks source link

how to get the current navigation id in current template folder? #152

Closed redsh4re closed 8 years ago

goFrendiAsgard commented 8 years ago

Sorry. What do you mean by current template folder? And why do you need to get current navigation id?

redsh4re commented 8 years ago

Yes. To get some additional settings of current navigation id

goFrendiAsgard commented 8 years ago

To get the navigation name, you can use this:

$navigation_name = $this->cms_navigation_name();

This will return the current navigation name by matching the url with the available navigation list. You can get navigation_id etc by accessing the database. (i.e: SELECT FROM cms_main_navigation)

$this->db->select('*')->from(cms_table_name('main_navigation')->where('navigation_name', $navigation_name);
redsh4re commented 8 years ago

Thanks