Get current page id

edited November 2012 in Modules
Hi I wonder if there is a 'simple' way to get the id of the current page.
I can't find the solution in the user guide. TY!

Comments

  • edited 2:41PM
    There are a few ways. For .93:
    // using the fuel_page object assuming it's already loaded $CI->fuel_page->id; // using a model $CI =& get_instance(); $CI->load->model(FUEL_FOLDER, 'pages_model'); $page_data = $CI->fuel_page->find_by_location(uri_path());

    If you are using 1.0 branch, you can use:
    // using the fuel_page object $CI->fuel->page->id;
Sign In or Register to comment.