Customising Contact Category to show image
Posted: Fri Mar 14, 2008 1:07 pm
I'm using J1.5 with a modified Beez template (default). I wish to alter the main Contacts Category page. Currently I have a menu item which doesn't specify a Contact Category to display and therefore lists all of the contacts. I've altered \templates\default\html\com_contact\category\default_items.php to display as I require, but I can't pickup the URL for for images (I have images defined for the contacts). My code is:
At teh top I wish to display the image (I'll add the base URL after). Currently this isn't appearing in the HTML. Do I need to modify part of the com_contact to get this to display?
Code: Select all
<?php foreach ($this->items as $item) : ?>
<div class="contact">
<img src="<?php echo $item->image; ?>" alt="<?php echo $item->name; ?>" height="200" width="170" />
<dl>
<?php if ($this->params->get('show_position')) : ?>
<dt><?php echo JText::_('Position'); ?></dt>
<dd><?php echo $item->con_position; ?></dd>
<?php endif; ?>
<dt><?php echo JText::_('Name'); ?></dt>
<dd><a href="<?php echo $item->link; ?>"><?php echo $item->name; ?></a></dd>
<?php if ($this->params->get('show_email')) : ?>
<dt><?php echo JText::_('Email'); ?></dt>
<dd><?php echo $item->email_to; ?></dd>
<?php endif; ?>
<?php if ($this->params->get('show_telephone')) : ?>
<dt><?php echo JText::_('Telephone'); ?></dt>
<dd><?php echo $item->telephone; ?></dd>
<?php endif; ?>
<?php if ($this->params->get('show_mobile')) : ?>
<dt><?php echo JText::_('Mobile'); ?></dt>
<dd><?php echo $item->mobile; ?></dd>
<?php endif; ?>
<?php if ($this->params->get('show_fax')) : ?>
<dt><?php echo JText::_('Fax'); ?></dt>
<dd><?php echo $item->fax; ?></dd>
<?php endif; ?>
</dl>
</div>
<?php endforeach; ?>