简体   繁体   中英

Joomla ZOO get this item id?

i'm working in joomla component zoo. what i need is to render at the item layout this item id.

i can get the list of all zoo items id, but can't find out how to get $this('id')
i can't use menu id as i want this to work also without every zoo item have its own menu link..

i'm working in full.php in zoo app template folder

this i got for now.. it give me all items ids..

$zoo= App::getInstance('zoo');
$zoo_items = $zoo->table->item->all(array('order' => 'id'));
foreach ($zoo_items as $zoo_item) { echo $zoo_item->id; echo '<br>'; }

so how i can get only THIS item id? thanks a lot

You need to use item get method & pass vaild zoo item id. It returns you all the information of Zoo item.

$ZooItemInfo = $this->app->table->item->get($ZooItemID);

Also, you can check following files to know more about Zoo API's.

administrator/components/com_zoo/classes/ administrator/components/com_zoo/tables/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM