SaaS CMS has officially launched! Learn more now.

How to get all contents with a specific smartform type?


Hello,  We had a request of retrieve all smartform contents with one specific smartform type "xxxx". How can we do it through database? Or Is there's a faster way of doing it?  thanks! 

Aug 02, 2018 17:05

Probably too late, but is this what you are trying to do?

ContentApi contentapi = new ContentApi(ApiAccessMode.Admin);
Criteria<ContentProperty> criteria = new Criteria<ContentProperty>();
criteria.AddFilter(ContentProperty.XmlConfigurationId, CriteriaFilterOperator.EqualTo, smartformid);
criteria.OrderByDirection = EkEnumeration.OrderByDirection.Ascending;
criteria.OrderByField = ContentProperty.Title;

List<Ektron.Cms.ContentData> contentDatas = contentapi.GetList(criteria);

May 23, 2019 22:42

Thanks! This is definitly a solution for my case! 

I was asking if there's a sql query can perform the job. 

- Wendy

May 24, 2019 18:35
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.