I need to get a com_contacts item the same way Joomla does (so I can re-use a template for example). I know I can get the item by querying the database directly, but that won't prepare things the same way Joomla das in com_content.
I can get contacts by category id fine with:
require_once JPATH_SITE . '/components/com_contact/helpers/route.php';
JLoader::import('joomla.application.component.model');
JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_contact/models', 'ContentModel');
$categoryModel = JModelLegacy::getInstance('Category', 'ContactModel', array('ignore_request' => true));
$categoryModel->setState('category.id', 53);
$categoryModel->setState('list.ordering', 'a.name');
$categoryModel->setState('list.direction', 'asc');
$categoryModel->setState('filter.published', 1);
$contacts = $categoryModel->getItems();
echo '<pre><tt>';print_r($contacts[0]);
How would I get a contact item by it's item id?
TIA!