hide navigation label in pages module

edited May 2012 in Modules
Just a simple question. I was wondering if it is possible to change the page information in the admin when one creates a page. I would like to hide the navigation label field because it screws up the navigation on the website and it does not need to be filled in anyway.
Is there a clean way to do this without changing the pages module?

Comments

  • edited 5:35PM
    It sounds like you are needing to modify an item in the Navigation Module instead if you are wanting to change the navigation in the website correct? If so, there are a couple ways to do that. The first is to mark it as hidden and then, if you are using the fuel_nav function in your pages, make sure the "include_hidden" parameter is set to FALSE (which it is by default). Additionally, you can use the "exclude" parameter to remove a particular navigation item.
  • edited 5:35PM
    Thanks again for your quick response!
    I think we have a miscommunication. Let me try to explain. When you are logged in fuel you can click page and create a page. Then when you click create, you get the field that you can fill in (location, layout etc). Now I would like to hide the Navigation label field.
    I hope this explanation is clearer.
  • edited 5:35PM
    I understand now. Unfortunately, that is something hard coded in the fuel/modules/fuel/pages.php controller on line 145 and can't be changed at the moment without altering the controller file.

    As an FYI, that particular field will be moved into the pages_model.php file in the next release which will allow you to overwrite it using the $config['module_overwrites'] parameter in the MY_fuel_modules.php config file like so:
    $config['module_overwrites']['pages']['model_name'] = 'MY_pages_model'; $config['module_overwrites']['pages']['model_location'] = 'app';

    This will require you to create your own model named MY_pages_model.php placed in your application/models/ folder. It will need to inherit the pages model (you will need to require_once that model at the top) then overwrite the form_fields method to return the fields you want.
  • edited 5:35PM
    Ok thanks. Second time in a week that a function I am looking for will come in the next release. It sounds promising. Do you have any idea when the release is planned?
  • edited 5:35PM
    Yeah... I'm getting tired of saying it too (sounds like vaporware). We have a couple projects right now that are taking it through its paces and our goal is to release after that which should be end of June early July.
Sign In or Register to comment.