I know how to create buttons in J-Cook components to do whatever function i like.. open in modal, edit, etc
However I would like to take J-Cook code snippets.. i.e
<?php echo JDom::_('html.fly', array(
'commandAcl' => array('core.edit.own', 'core.edit'),
'dataKey' => 'title',
'dataObject' => $row,
'num' => $i,
'task' => 'records.edit'
));?>
but add my own label.. so the task is the same, the correct record opens, but I don't have to construct the button manually.. i something like this
<?php echo JDom::_('html.fly', array(
'commandAcl' => array('core.edit.own', 'core.edit'),
'label' => 'Edit this Record',
'dataObject' => $row,
'num' => $i,
'task' => 'records.edit'
));?>
so instead of the hyperlink using the $this->item->title entry, I have a clickable 'Edit this Record' which does the same thing.
Like I said, I know how to construct the button, but would be nice to stick to the JDOM method above and let the button be generated like other content in the component. I suspect this is possible, but I cant find the right combination in the array