Keyword

Extra field in module

  • Gaetan SENELLE
  • Gaetan SENELLE's Avatar Topic Author
  • Offline
  • New Member
More
13 years 8 months ago #92455 by Gaetan SENELLE
Extra field in module was created by Gaetan SENELLE
Hello,

 

I want display extra field in a module. I think i can do that with Jumi but how ?

I try :

 

  $extraFlds = array(); foreach ($this->item->extra_fields as $key=>$extraField): $extraFlds[$extraField->name] = $extraField->value; endforeach;echo $extraFlds;

 

But don't work

 

Thank you for your help.

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

  • Gaetan SENELLE
  • Gaetan SENELLE's Avatar Topic Author
  • Offline
  • New Member
More
13 years 8 months ago #92456 by Gaetan SENELLE
Replied by Gaetan SENELLE on topic Extra field in module
ok i have solution :

 

Make module

 

In helper.php : Copy the com_ky/model/item.php and change class name

 

In default.php (of module):

$item=modinfo::getData(); //import datas  /*$test=modinfo::prepareItem($item, $view, $task);*/$this->item->extra_fields=modinfo::getItemExtraFields($item->extra_fields);        //read datasprint_r($this->item->extra_fields); //you can delete?> <div class="itemExtraFields">          <h3><?php echo JText::_('Additional Info'); ?></h3>          <ul>            <?php foreach ($this->item->extra_fields as $key=>$extraField):?>            <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">                <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>                <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>            </li>            <?php endforeach; ?>            </ul>        <div class="clr"></div>      </div>

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

More
13 years 8 months ago #92457 by william white
Replied by william white on topic Extra field in module
If you have this on  a live site please post a link

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

  • Gaetan SENELLE
  • Gaetan SENELLE's Avatar Topic Author
  • Offline
  • New Member
More
13 years 8 months ago #92458 by Gaetan SENELLE
Replied by Gaetan SENELLE on topic Extra field in module
Sorry, the site is closed. And in french

William White said:
If you have this on  a live site please post a link

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


Powered by Kunena Forum