Skip to main content
All CollectionsAPI / Customization / AdvancedPeopleVine HTML API Render Engine (HAPI)
A Nice Little HAPI Snippet with Business and Contacts Included
A Nice Little HAPI Snippet with Business and Contacts Included

Check out this HAPI sample to see how to include a business directory profile and the contacts associated with them.

Updated over 3 years ago

First off, you ened to setup a business directory. Here you'll add the basic profile, photos, etc. along with adding the contacts. If you manage all contacts, you can see an option to change the contact type.

Once done, you can implement this simple HAPI:

Show All in Directory

<ul> 
<li data-pv-component="directory" data-pv-type="business" data-pv-parameters="{category_no: 3871, returnTotal: 100}">
<a href="affinity-clubs-list.php?action=view&amp;id=0"></a>
<p></p>
</li>
</ul>


โ€‹View Directory Profile

<div class="left cols" data-pv-component="directory" data-pv-type="business" data-pv-parameters="{business_no: {@q:id@}, includeContacts: true}"> 
<div class="pad">
<h1></h1>
<div data-pv-repeater="contacts">
<p><b>{@contact_type@}:</b></p>
<ul>
<li> <b>{@customer.first_name@} {@customer.last_name@}</b><br> <a href="mailto:{@customer.email@}">{@customer.email@}</a><br> <br>
</li>
</ul>
</div>
<div data-pv-element="about">About Bio Here</div>
</div><!--end .pad-->
</div><!--end .left-->


โ€‹

Did this answer your question?