I'm creating my custom component. In backend I have the list of single records. They have parent records in the DB as parent_id and therefore are displayed in backend only as ids. How to display names of these parents instead of their ids?
In my models/records.php there is the query:
$db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select('id, header, parent_id, ordering, published'); $query->from('#__records'); return $query;
and in views/records/view.html.php there is
$this->items = $this->get('Items'); The names of records are stored in the DB in the field header