All Collections
API / Customization / Advanced
PeopleVine HTML API Render Engine (HAPI)
Sample Code - HAPI Membership Directory + Repeater with Conditional Statements
Sample Code - HAPI Membership Directory + Repeater with Conditional Statements

Check out this HAPI sample to see how to setup a dynamic member directory.

Updated over a week ago

In order to cusotmize the directory, you can implement this simple HAPI:

Show All in Directory

<div class="directory" data-pv-component="membership" data-pv-type="memberships" data-pv-parameters="{includeCustomerMini: true, customer_name: '{@q:first_name@} {@q:last_name@}', validateCustomerForDirectoryAccess: true, page_number: {@q:page:1@}, rows_per_page: 25, returnDataAttributes: true}" data-pv-object="hx"> <div class="directory_left"> 
<img src="{@membership_card_graphic@}" width="100">
</div>
<div class="directory_middle">
<h3><a class="directoryName" href="directory.php?action=view&amp;id=">{@customer.last_name@}, {@customer.first_name@}</a></h3>
<div class="profile_social">
<div data-pv-repeater="dataAttributes">
<a href="{@attribute_value@}" target="_blank" data-pv-do="conditional" data-pv-conditional="{@attribute_name@}=LinkedIn || {@attribute_name@}=Twitter || {@attribute_name@}=Facebook"><img border="0" height="16" src="directory/{@attribute_name@}.jpg" width="16"></a> </div> <div class="clear"></div> </div><strong>&nbsp;</strong><br> {@customer.company_name@}<br> {@customer.address@} {@customer.address2@}<br> {@customer.city@}<br> {@customer.state@}<br> {@customer.zip_code@}<br> <div data-pv-repeater="dataAttributes"> <a class="directoryLink" href="{@attribute_value@}" target="_blank" data-pv-do="conditional" data-pv-conditional="{@attribute_name@}=website">View Website</a> </div> </div> <div class="directory_right"> Phone: <span data-pv-element="customer.mobile_number" data-pv-formatter="phone">###-###-####</span><br> <a class="directoryLink" href="mailto:{@customer.email@}">{@customer.email@}</a> </div> <div class="clear"></div></div>


โ€‹

Did this answer your question?