{{#getPosts}} helper

{{getPosts}} is a helper used to retrieve post data regardless of the current context.


{{#getPosts "postID1,postID2,postID3" "before" "after"}}


{{#getPosts "POST_ID_1,POST_ID_2,POST_ID_N" "<ul>" "</ul>"}}
    <h2>{{ title }}</h2>
    <div>{{{ excerpt }}}</div>

Posts are ordered by the ID order in the string.

The second parameter creates HTML prefix, the third parameter creates HTML suffix for the generated output.

IMPORTANT: It requires availability of the @website.contentStructure global variable


Get the latest Publii news, updates and more delivered directly to your email inbox

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at By clicking below, you agree that we may process your information in accordance with our Privacy Policy.