CMSMS CompanyDirectory

From Microformats Wiki
Jump to navigation Jump to search

The CMSMS CompanyDirectory module can support hCard 1.0 and microformats2 h-card with minor template updates.


For example, the file orig_detail_template.tpl (inside the Templates directory in the CompanyDirectory directory) could be updated as such:

<div class="CompanyDirectoryItem vcard h-card">

Name: <span class="fn org p-name p-org">{$entry->company_name}</span><br />

{if $entry->address ne ''}
Address: <span class="adr p-adr h-adr">{$entry->address}</span><br />

{if $entry->telephone ne ''}
Telephone: <span class="tel p-tel">{$entry->telephone}</span><br />

{if $entry->fax ne ''}
<span class="tel p-tel"><span class="type">Fax</span>: 
<span class="value">{$entry->fax}</span>

{if $entry->contact_email ne ''}
Contact Email: 
<a class="email u-email" href="mailto:{$entry->contact_email}">{$entry->contact_email}</a><br />

{if $entry->website ne ''}
Website: <a class="url u-url" href="{$entry->website}">{$entry->website}</a><br />

{if $entry->details ne ''}
Details:<br />
<span class="note p-note">{$entry->details}</span><br />

{if $entry->picture_location ne ''}
Picture: <img class="photo u-photo" src="{$entry->picture_path}" /><br />

{if $entry->logo_location ne ''}
Logo: <img class="logo u-logo" src="{$entry->logo_path}" /><br />

{if isset($entry->fields) }
  {foreach from=$entry->fields key='field_name' item=customfield}
	{$customfield->name}: {$customfield->value}<br />

{if $categorytext ne ''}
Categories: {$categorytext}<br />


see also