list

This will display a list of content pages based on the data-pv-parameters set.

Most common use-case for this component is to pull back blog data and display.

<div data-pv-component="content" data-pv-type="list" data-pv-parameters="{page_type: 'X', flag:'X', returntotal:1, sortby:'X'}" data-pv-object="abc">
    // Some code
</div>

Common HAPI elements used within the <div>:

  • {@author@} - this will return the author of the blog post

  • {@category_name@} - this will return the category assigned to the blog post

  • {@created_on@} - this will return the created on date/time

  • {@flag@} - this will return "Featured" if the blog post is flagged as a featured post

  • {@page_name@} - this will return the page name

  • {@page_photo@} - this will return the page graphic

  • {@page_title@} - this will return the page title

  • {@page_type@} - this will either be blog post or content based on page type

Common data-pv-parameters used within the <div>:

  • page_type: 'blog', 'content'

  • returntotal: '999'

  • sortby: 'newest', 'oldest', 'posted_on'

  • category_no: corresponding category no

  • page_status: 'active'

Last updated