Find page id from page files folder id

A customer had an URL to a page file, but couldn’t locate the page where the file was stored. And somehow the search in EPiServer didn’t give any hits on the file, so started digging around in the database and found the column ExternalFolderID in the table tblPage.

So a simple query like “SELECT pkID FROM tblPage WHERE ExternalFolderID = 3493” where 3493 was the page folder id gave us the answer.

Edit:

As Anders says in the comment below, you can also get the page by code:

PageData ownerPage = UnifiedDirectory.GetOwnerPageFromVirtualPath(“/PageFiles/3493/”);

2 thoughts on “Find page id from page files folder id

  1. Anders Hattestad

    or this code should also work
    PageData ownerPage = UnifiedDirectory.GetOwnerPageFromVirtualPath(“/PageFiles/3493/”);

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA image
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>