Simple module title breadcrumb

edited September 2014 in Modules
OK, I know I've done this before, but for the life of me I cannot remember. In a simple module, how do I override the 'breadcrumb' title that appears when I'm editing a record? In my case, I have two fields in the database - first/last name - but the breadcrumb is just showing the first name. (first field)

Comments

  • edited 9:28AM
    There is a module property of "display_field" that you can specify in MY_fuel_modules.php. By default it will use the first field name without the "_id" suffix. In your case, you may need to use the "_common_query" method on your module to include a "full_name" value that concatenates the first and last name together:
    function _common_query() { parent::_common_query(); $this->db->select('mytable.*, CONCAT(mytable.first_name, ' ', mytable.last_name) as full_name, FALSE); }
  • edited 9:28AM
    Ah - this is sounding familiar to me now - thanks for the response. However, when I add the key to MY_fuel_modules, plus the new _common_query, I'm getting the following on record edit:

    ---

    Unknown column 'full_name' in 'field list'

    SELECT id, full_name FROM (`table`) ORDER BY `full_name` asc

    --

    I do have a similar statement on list_items in the model that is working OK - is that related?
Sign In or Register to comment.