Hi -- I'm totally new
I have menu working
I have breadcrumbs working
I have submenu working
I want a page title -- one that does not look like breadcrumbs -- just the label for the ultimate menu item. Where I want it makes it logical to have in the layout header and accessed via the menu helper. Is there a way?
Comments
http://www.getfuelcms.com/user_guide/general/opt-in-controllers
If a page created in the admin has a variable of $page_title, then it will overwrite that default value with whatever was filled out in the admin.
If you just want it to be the label of the menu item, you could use the URI string of the page you are on using the FUEL function uri_path(). Then, if the navigation is controlled by the admin, you could use that value to either query the database using the fuel navigation_model like so:
$nav_item = fuel_model('navigation_model', array('find' => 'one', 'where' => 'location="'.uri_path().'"', 'module' => FUEL_FOLDER)); $page_title = $nav_item->title;
Or if you are using the static fuel/application/views/_variables/nav.php file to control the navigation and the keys to the navigation items are the URI paths, you could try something like this:
include(APPPATH.'views/_variables/nav.php'); $nav_item = $nav[uri_path()]; $page_title = $nav_item['title'];
Here is a little more information on fuel_nav() and navigation structures
http://www.getfuelcms.com/user_guide/helpers/fuel_helper
http://www.getfuelcms.com/blog/id/4
Hope that helps!