Welcome, Guest
Username: Password: Remember me

TOPIC: Jdom:: get column name

Jdom:: get column name 17 Jul 2013 18:27 #10501

  • pinochet
  • pinochet's Avatar
  • Offline
  • Senior Member
  • Posts: 47
  • Karma: 0
I tried to get into the fly of an item, along with the icon of yes or not the name to column or field belongs.
So that if the result is not just not appears the icon and name of the field.
any idea how to print Jdom do with field name

<?php echo JDom::_('html.fly.bool', array(
'dataKey' => 'bao_en_hab_principal',
'dataObject' => $this->item,
));
?>
Last Edit: 17 Jul 2013 18:27 by pinochet.
The administrator has disabled public write access.

Jdom:: get column name 18 Jul 2013 09:50 #10511

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
I do not understand your question.

This example you wrote above will send $this->item->bao_en_hab_principal to JDom

html.fly.bool mean that if your value is NULL, 0, or 1 then it will show the correct icon.

I know the final UI rendering is not really accomplished yet. Possible optimizations and Joomla standards.

Can you describe better your point please ?
Coding is now a piece of cake
Last Edit: 18 Jul 2013 09:51 by admin.
The administrator has disabled public write access.

Jdom:: get column name 18 Jul 2013 15:26 #10517

  • pinochet
  • pinochet's Avatar
  • Offline
  • Senior Member
  • Posts: 47
  • Karma: 0
I would like to know how to return the name and value, for example:
closet: yes.
but this jdom return it, so if the field is not NULL empty name and value will appear.
can be done from JDOM?
The administrator has disabled public write access.

Jdom:: get column name 19 Jul 2013 20:36 #10530

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
If you want to reuse that on various pages, then create a new JDom class.

more simple :

create a function in your concerned view file.
protected function renderBool($value, $params....)
{
$html='';
...
return $html;
}

then in the template :
echo $this->renderBool(....);
Coding is now a piece of cake
The administrator has disabled public write access.

Jdom:: get column name 23 Jul 2013 20:43 #10558

  • pinochet
  • pinochet's Avatar
  • Offline
  • Senior Member
  • Posts: 47
  • Karma: 0
sorry but do not understand how to do it, I have to put here:

protected function renderBool ($ value, $ params ... / / do not get to add here)
{
$ html ='';
... / / Do not get to add here
return $ html;
}

please help me a bit I do not understand
The administrator has disabled public write access.
Time to create page: 0.087 seconds

Get Started