I have created some new pages from the admin, inside "Navigation" link Now I want to show that menu in frontend (Home page). So what is the best way to set navigation?
With regards to your second question, if you are wanting to get your model data into your views, you can use the fuel_model helper function or load the module in like so:
// using the helper function
fuel_model('ad_categories', array('module' => 'ads'));
// using the load method
$CI->load->module_model('ads', 'ad_categories_model');
$categories = $CI->ad_categories_model->find_all();
I have seen the Menu Class & fuel_nav(), it's working extremely fine.. Just only one thing I didn't found any where.. And that is, How to set custom CSS class in [ul] tag?
For Example, According to my custom layout, I have below type of menu code.
Comments
Like I have created module name as "ads"
in that I have category,subcategory,products.
Now I want to show that list in home page, So how can I retrieve it from my module?
What is the best way for it?
http://www.getfuelcms.com/user_guide/helpers/fuel_helper
http://www.getfuelcms.com/user_guide/libraries/menu
We wrote a blog post last weeks about using menus that may help too:
http://www.getfuelcms.com/blog/2010/12/12/learning-fuel-cms-part-2
With regards to your second question, if you are wanting to get your model data into your views, you can use the fuel_model helper function or load the module in like so:
// using the helper function fuel_model('ad_categories', array('module' => 'ads')); // using the load method $CI->load->module_model('ads', 'ad_categories_model'); $categories = $CI->ad_categories_model->find_all();
Here are some reference links for fuel_model and MY_Model (which is a base model that your module models inherit from):
http://www.getfuelcms.com/user_guide/helpers/fuel_helper
http://www.getfuelcms.com/user_guide/libraries/my_model
This is the great help!!!! I will study all and checkout.
I have seen the Menu Class & fuel_nav(), it's working extremely fine..
Just only one thing I didn't found any where.. And that is, How to set custom CSS class in [ul] tag?
For Example, According to my custom layout, I have below type of menu code.
[ul id="main_menu" class="main_menu"] [li]<a href="/about">About</a>[/li] [li]<a href="/feedback">Feedback</a>[/li] [/ul]
by fuel_nav() how can I set property (id, class) of [ul] tag?
<?php echo fuel_nav(array('container_tag_id'=>'menu')); ?>
Done... And now working fine
Thanks