Identify your Episerver content!

Episerver CMS is a system for managing content such as pages, blocks, images and documents. You can have multiple pages with the same name, you can even have a block and an image with the same name. When we are communicating about content, the name is not always the best way to communicate what particular piece of content you are talking about.

The content id

All content in Episerver has a unique content id. The id is numerical. When we are talking about pages, you may call it the page id. When we are talking about blocks, you may call it the block id. When we are talking about images, you may call it the image id. Both page ids, block ids and image ids are content ids.

Episerver content is stored in a SQL database, and the content id is the primary key of the database table tblContent. The first content ever created gets content id 1, and every subsequent content gets the id one higher.

Because all content ids are the primary key in the same database table, no two pieces of content can have the same id. If a page has page id 9, no block can have block id 9.

Where to find the content id

If you know the name of your content, or any other details like the URL segment, you could simply query the database.

SELECT fkContentID
FROM tblContentLanguage
WHERE Name = 'My Special Page'

Probably not the most intuitive approach for most users. Luckily there are simpler options.

If you place your mouse cursor over a page in the page tree in edit mode, and keep it still for about a second, you will see a tooltip with the content id, together with page name and page type name. This also works for images and blocks, in the assets pane.

In All properties view, you may also see the content id above all the properties.

In the on-page editing view, it if we look at the scrollbar, it looks like you can not scroll further up.

That's a lie! Using the scroll wheel on your mouse, you can scroll up and locate the content id!

What to do with the content id

If you want to edit page with content id 9, like we identified above you may replace the content id in the URL with 9 like this. So, that's another way to find the content id - simply look at the URL.

If you do not want to modify the URL, you may also use the search box above the page tree and search for the content id.

Share the edit URL

The URL from edit mode, can look kind of cryptic, but you may share this URL with other people with access to edit mode. Given that they have access to the same content, they will see the same content as you. This works for all content, both pages, blocks and images.

Use the id!

When you talk to others about the content, use the content id. The name can change, the page type can change, but content ids are forever! 💎