JBZoo update 2.1.5 with the full support of ZOO 3.2

9.5/10 rating (2 votes)

Recently YooTheme have released new 3.2 version of their Zoo component. Main new features are ACL support and front-end item editing. You can read more about this on their website.

JBZoo update 2.1.5 with the full support of ZOO 3.2

Support of new features in JBZoo

In order to support these new features, we have quickly made a release of JBZoo 2.1.5. This version also includes some bugfixes, so it’s recommended to make an update.

Manually adding edit template

All item types need a new edit template to support front-end editing. If your item types don’t have it after an update of Zoo and JBZoo, it’s easy to add it manually. Just carefully follow instructions below.

1. Add edit template

All templates that we will be changing are located here:

media\zoo\applications\jbuniversal\templates\catalog\renderer\item We’ll be referencing this path as <ITEM_TMPL>

Create new files <ITEM_TMPL>/edit.php or <ITEM_TMPL>/<TYPE>/edit.php

<fieldset class="pos-content creation-form">
    <legend><?php echo $item->getType()->name; ?></legend>
    <?php if ($this->checkPosition('content')) : ?>
        <?php echo $this->renderPosition('content', array('style' => 'submission.block')); ?>
    <?php endif; ?>
</fieldset>
<?php if ($this->checkPosition('media')) : ?>
    <fieldset class="pos-media creation-form">
        <legend><?php echo JText::_('Media'); ?></legend>
        <?php echo $this->renderPosition('media', array('style' => 'submission.block')); ?>
    </fieldset>
<?php endif; ?>
<?php if ($this->checkPosition('meta')) : ?>
    <fieldset class="pos-meta creation-form">
        <legend><?php echo JText::_('Meta'); ?></legend>
        <?php echo $this->renderPosition('meta', array('style' => 'submission.block')); ?>
    </fieldset>
<?php endif; ?>
<?php if ($this->checkPosition('administration')) : ?>
    <fieldset class="pos-administration creation-form">
        <legend><?php echo JText::_('Administration'); ?></legend>
        <?php echo $this->renderPosition('administration', array('style' => 'submission.block')); ?>
    </fieldset>
<?php endif;

2. Declare positions

Open the positions.xml file (it’s right next to edit.php) and add such code by analogy with other records

<positions layout="edit">
    <position name="content">Content</position>
    <position name="media">Media</position>
    <position name="meta">Meta</position>
    <position name="administration">Administration</position>
</positions>

3. Add template description

Open the metadata.xml file (it’s right next to edit.php) and add such code by analogy with other records

<layout name="edit" type="edit">
    <name>Edit</name>
    <description>An item is rendered with the edit layout in the item edit view.</description>
</layout>

4. Configure the edit template in the control panel.

Don’t forget to update Zoo first. And be sure to make a full backup of your website before making any updates.

Should you have any problems, don’t hesitate to ask our tech support.

9.5 5119
Leave a comment