Collection pages¶
A collection page is one page that becomes many: one page per blog post, per product, per team member. You design the page once. When you publish, Silex creates one page for each item of a list from your data source.
How it works¶
A collection page is a normal page with two settings, in its Page settings (gear icon next to the page in the Pages panel):
- Page data, in the CMS tab: the list to use, for example
posts. Each item of the list gets its own page. - Permalink, in the General tab: the URL of each page, built from the item, for example
blog/followed by the post'sid.
A blog with 100 posts gives 100 pages.
Setting up a collection page (example: blog)¶
You need a data source first: see Connecting a data source.
The field names below (posts, data, id, title, body) come from a test API. Your CMS has its own names. When you click + in an expression, the menu lists the real fields. Pick the closest ones.
Step 1: Create the page
- Open the Pages panel and click + next to Pages
- Name the page, for example
Post, and click Ok
Step 2: Set the Page data
- In the Pages panel, click the gear icon next to the page name. This opens the Page settings. They are not the Element settings (gear icon at the top of the right panel)
- Open the CMS tab
- Under Page data, click + and pick the list, for example
posts, then the field that holds the list, if there is one: its type ends with[], likedata (post[]) - Click Apply at the bottom of the Page settings window
The Collection Pages list, below the page list in the Pages panel, now has one entry per item. The next time you open the CMS tab, the text below the field says how many items the list has, for example 100 objects with id, title, body.

Step 3: Set the Permalink
- Open the Page settings again (gear icon next to the page name), and stay in the General tab
- Under Permalink, click Expression
- Click + and pick Page item (Post) (in the group Website's states). Its name ends with the type of your items, so with your CMS it can be different. Then pick a field that is different for each item, like
idor a slug - To put the pages in a
blog/path, click + at the end and pickprepend. Click the … next toprepend. In the small window that opens, click Fixed next to Prefix, typeblog/and click Apply - Click Apply at the bottom of the Page settings window
The text below the field shows the URL of the item shown on the canvas. In the picture below, the canvas shows the second post, so the URL is blog/2.

Step 4: Show the item on the page
- From the Blocks panel, drag a Text onto the page
- Open the Element settings (gear icon at the top of the right panel)
- In Properties, click Expression next to HTML content
- Click +, pick Page item (Post) (in the group Website's states), then
title - Do the same with a second Text, and pick
bodyinstead oftitle
Page item is the item of the current page: on the page of post 2, it is post 2.
Step 5: Check each item in the editor
In the Collection Pages list of the Pages panel, click an entry: the canvas shows the page with that item.
Step 6: Publish
Publish your site. Each item gets its own page: with the settings above, post 1 is at /blog/1/, post 2 at /blog/2/, and so on.
If you leave Permalink empty, it depends on where you publish:
- From the online editor, the URLs use the page name and a number. The first item is at
/post/, the second at/post/1/, the third at/post/2/. - From Silex Desktop, with the default settings, the site is not published. A message asks you to set the Permalink in the page settings, General tab.
Good to know¶
- The pages are static. They are created at publish time. When you add a post in your CMS, publish again to get its page.
- Page data takes only a list. Unlike Permalink, it has no filters: you cannot sort the list or keep only some items there.
- The Pages panel has no folders. The path of the URLs (
blog/,products/) comes from the Permalink. - Size, under Deprecated in the CMS tab, is the number of items per page. Leave it at
1for one page per item.
Learn more¶
- Expressions: building the expressions used above
- Binding data: showing data in elements
- Publishing: the full publish pipeline
- Developer: build awesome config: the build that creates the pages, powered by Eleventy