I have a website built using Joomla 3 and the YooTheme Zoo CCK.
I have created a custom application in my /media/zoo/applications folder.
My Application has two types, Products and Packages.
My packages are divided into categories, and each category has a teaser image set.
I would like to use the "category" teaser image as the teaser image for each "item" within that category.
I am aware of where I should be making the change to my custom application's source code: /media/zoo/applications/my_custom_app/templates/default/renderer/item/teaser.php but I am unsure of the correct line of PHP to add, so that it pulls the teaser image from the category.
I have tried <?php echo $this->category->getImage('content.image'); ?> but it appears that $this->categorydoesn't exists within this context.
Here is a pastebin of my current teaser.php: http://pastebin.com/Pj7UZ4Ye
I can give you a partial answer for what i did in a website i build before. I wanted to display the image of the category on all of the items inside it. I didn't tried to alter the items teaser image but include the image on the existing element category. By default the category element (/media/zoo/elements/itemcategory) can show the category name as a link or just text. So i edited /media/zoo/elements/itemcategory/itemcategory.php at line ~ 40+
So you just remove or comment out what starts with --- and add what starts with +++ You can always override the php file so it will not get updated when you install a new zoo version by copying the file from
to
So you can now edit your application Full layout and remove image and add the categories CORE element to the same position :P
Please let me know if you need any more help!