Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

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,
));
?>

Please Log in or Create an account to join the conversation.

Last edit: by pinochet.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

Last edit: by admin.

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

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?

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

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

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

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.085 seconds

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started