> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.laposta.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.laposta.org/_mcp/server.

# Loading an RSS feed with template tags

> Automatically fetch articles from your website into your own HTML template, so you do not have to copy and paste them.

Many websites have an RSS feed (or its variant, an Atom feed) linked to them. This contains articles from the site in a standard, machine-readable format. Laposta can read this feed and insert the articles into a template, allowing you to quickly populate a newsletter without copying and pasting.

As soon as you place an RSS block in the newsletter, Laposta loads the feed and displays the items. You can edit the content and the order of the items, and reload the feed.

> **Note**
>
> These tags only apply to an imported HTML template, not to the drag & drop editor. You can read how to import such a template in [Importing a custom template into Laposta](/welke-opties-biedt-laposta-bij-een-zelfgemaakt-sjabloon).

## Starting the feed with `<lp-rss>`

Enclose the feed between `<lp-rss>` and `</lp-rss>`. You can include multiple feeds in the same template.

### Options

**`lp-rss-url`**

Indicates which feed should be loaded.

---

**`lp-rss-type`**

Indicates the feed type: `rss` or `atom`. If you omit this attribute, Laposta defaults to `rss`.

---

**`lp-rss-maxitems`**

The maximum number of items to be loaded. Example: with `lp-rss-maxitems="5"`, at most 5 items are shown. If you omit this attribute, all items are loaded.

You can still adjust this number when populating the newsletter.

---

**`lp-rss-range`**

Indicates a from/to range for the items to be shown, in the format `[number]-[number]`. With `lp-rss-range="2-5"`, only items 2, 3, 4 and 5 are shown. You can also show a single item, for example `lp-rss-range="1-1"` for the first item only.

If you omit this attribute, all items are loaded.

---

**`lp-rss-striphtml`**

Sometimes the text in a feed contains HTML. Add this attribute if you do not want that HTML to be displayed in the editor.

---

**`lp-rss-maxchars`**

With `lp-rss-maxchars="[x]"`, you specify that the content of items in the feed must not exceed x characters.

---

**`lp-rss-filter`**

Indicates which items may be shown, based on a field in the feed that can contain multiple values, such as labels or categories. For example, if the feed contains this:

```html
<label>
  <item>Pensions</item>
  <item>Housing</item>
  <item>Labour market</item>
</label>
```

If you only want to show articles about the labour market or education, the filter looks like this:

```html
lp-rss-filter="label|item|labour market,education"
```

The format is `[field name]|[sub-items name]|valueA,valueB,valueC,...`

If the sub-items are located directly in the feed without a parent item, leave the first position empty. For example, if the feed contains this:

```html
<category>Pensions</category>
<category>Housing</category>
<category>Labour market</category>
```

Then the filter will be:

```html
lp-rss-filter="|category|labour market,education"
```

---

## Showing text with `<lp-rss-content>`

The HTML between `<lp-rss>` and `</lp-rss>` is repeated for each item in the feed. Within it, you can include the content from the feed.

**`<lp-rss-content:[veldnaam]>`**

Field naming varies per feed. Place the name of the field after the colon, for example `<lp-rss-content:title>` for the title.

For sub-properties and attributes, use a double hyphen: `<lp-rss-content:category--term>` for `<category term="..."/>`.

---

**`<lp-rss-content:datenl>`**

A special field that shows the date of the item in Dutch format.

---

### Making content editable

If you want a user to still be able to edit the content when populating the newsletter, use these attributes:

**`lp-type`**

With `lp-type="singleline|multiline"`, you specify whether the text is a singleline or a multiline.

---

**`lp-edit`**

Add this to an image to make it editable.

---

## Showing an image with `<lp-rss-image>`

A feed often contains an image for each item. You can show this using `<lp-rss-image>`. No special attributes are required. You can use this tag like a regular image.

**`<lp-rss-image:src>`**

Use this if you only need the location of the image.

---

## Example

This example loads the feed from the Dutch newspaper de Volkskrant and shows the title with a link, the image and the text for each item.

```html
<lp-rss lp-rss-url="https://www.volkskrant.nl/voorpagina/rss.xml" lp-rss-type="rss" lp-rss-range="1-5">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td align="left">
		<a href="<lp-rss-content:link>"><lp-rss-content:title lp-type="singleline"></a>
</td>
</tr>
<tr>
	<td align="left">
		<lp-rss-image width="560" lp-edit>
	</td>
</tr>
<tr>
	<td align="left">
		<lp-rss-content:description lp-type="multiline">
	</td>
</tr>
</table>
</lp-rss>
```

## Related articles

#### [Creating an automatic table of contents with template tags](/tags-om-een-inhoudsopgave-te-tonen)

With the lp-toc tag, you can automatically create a table of contents in your own HTML…

#### [Making text editable with template tags](/tags-om-tekst-te-wijzigen)

Make single lines of text and longer text blocks editable in your own HTML template.

#### [What requirements does accessible HTML code meet?](/opbouw-html-code-in-het-kader-van-toegankelijkheid)

Guidelines for headings, tables, alt texts, screen readers and more for an imported…

#### [Importing a ready-made newsletter](/hoe-importeer-ik-mijn-nieuwsbrief-vanaf-internet)

Import your own HTML newsletter from the internet, your computer or by pasting the code…