Cannot change navigation group in admin
  • DODMax February 15
    Hello,

    Just updated to v0.9.3-147 and I cannot change the navigation anymore in the navigation list with Chrome.
    The select list displays correctly but when I pick an option the page reloads but stays on the first option.
    Tried to clear the cache but didn't help. Works fine with Firefox.

    Chrome version: 16.0.912.77m
  • adminadmin February 15
    When you say navigation list, where are you referring?
  • DODMax February 15
    Strangely it works now, probably a cache issue...

    Anyway, I was referring to the Navigation Group dropdown (in the top right corner) of the /fuel/navigation page.

    Quickly another question: is there a way to get the location of the current page (not the URI)? I would like to add a canonical link for each page in the header.

    Sorry for the troubles and thanks!
  • adminadmin February 16
    CodeIgniter has a current_url() function that sounds like what you need. For a URI, you can use the FUEL function uri_path().
  • DODMax February 16
    My problem is that my client does not really make a difference between mysite.com/test and mysite.com/Test but Google in fact consider it as 2 different urls, this creates duplicate content.
    I thought of the canonical link as a solution but I would need the actual location as saved in the DB to do that.
  • adminadmin February 16
    To query the pages_model, you can do the following:
    $CI =& get_instance();
    $CI->load->module_model(FUEL_FOLDER, 'pages_model');
    $location = uri_path();
    $page = $CI->pages_model->find_by_location($location);

    However, find_by_location is case sensitive and "Test" and "test" are considered different so you may need to check for both by running a strtolower() or ucfirst() function on the $location value.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories