Pop Tags


Another collection tag is the <pop:entries> tag. Without a from attribute this tag will display any entries of the current content. Only sections and categories can have entries. If the content being displayed by the template is an entry, the <pop:entries> (without a from attribute) will do nothing. Here’s a simplified example of the typical index page of a blog section:

<!doctype html>
      <div class="post">
        <h2><a href="<pop:permalink/>"><pop:title/></a></h2>
        <div class="body"><pop:body/></div>

As with any other content tag, the from attribute only pulls entries from a specific section. You can also use limit to decide on the number of entries to pull in. This snippet would show you the 3 entries from the blog:

<pop:entries from="blog" limit="3">

Just as with <pop:sections>, if you nest the <pop:entries> tag inside another content tag without a from attribute, you’ll get the entries from that content. The following snippet would list all the entries from all the top level sections:

Continue to Categories »