Query for determining folder path

  • Updated

We have seen a few customers that have been asking for how to be able to determine a folder path within a database of the Optimizely CMS. Although we do not support querying the database directly the following queries have helped be a starting point for customers looking 


Initially the folder path for a particular item can be found using the following query

Select ContentPath
from tblcontent
where pkid = x

The result of this query would be a list of ID's separated by periods. This list can then be used to query the names for the specific content returned.

select distinct fkContentID, [name]
from tblworkcontent
where fkContentID in (A,B,C)
order by fkContentID
An example of the query being used to find the path for a page from an Alloy testing site.