# Article Collection

The ArticleCollection generator allows you to create components powered by dynamic blog content. Users can optionally filter, sort, and pin articles to a given section using this component, giving them the flexibility to selectively display editorial content throughout your site.

```jsx
<ArticleCollection 
  dataRef={content.articles}
  tagName="div"
  item={(article)=>
    <div class="article">
      <div class="title">
        <a href={`/${article.slug}`}>{article.content.header}</a>
      </div>
    </div>
  )}
/>
```

## Attributes

* **dataRef**: DataLocator - the data-element storing the ArticleCollection's configuration
* **item**: anonymous [arrow function](https://www.w3schools.com/js/js_arrow_function.asp) - used to render an article
* **tagName**: string (optional) - a hard-coded tag name for the rendered element
* **className**: string (optional) - a hard-coded class name to add to the rendered element
* **minItems**: number (optional) - the minumum # of items allowed in this collection (Default: 1)
* **maxItems**: number (optional) - the maximum # of items allowed in this collection (Default: 10)
* **defaultItems**: number (optional) - the starting # of items in this collection on creation
* **enablePinning**: boolean (optional) - when True, allows content authors to pin specific articles to this list semi-permanently, until unpinned (Default: True)
* **enableFiltering**: boolean (optional) - when True, allows content authors to select the blog, category, or tags by which to filter articles for this list (Default: True)
* **enableSorting**: boolean (optional) - when True, allows content authors to select the sorting order by which to filter articles for this list (Default: True)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.unstack.com/docs/tags/articles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
