Try our conversational search powered by Generative AI!

Santosh Achanta
Jun 26, 2014
  1838
(2 votes)

Only find pages those hold data with no shortcut link to other pages, etc.

I had a requirement to find only pages those doesn't have shortcut link to another page or fetch data from another page etc means those pages holding the actual property data that needs to be manipulated.

When I couldn’t find quickly on how that can be done using property criteria using the FindPagesWithCriteria method, I stumbled on digging little bit into EPiServer.Core and found that the PageShourtcutType is of type enum which has the first option ‘Normal = 0’ which I need to look for.

When I debug the PageDataCollection before filtering with criteria, I noticed that the value stored is a number.

So my code snippet as below and it worked like a charm in the first instance.


new PropertyCriteria {
    Condition = CompareCondition.Equal,
    Type = PropertyDataType.Number,
    Name = "PageShortcutType",
    Value = "0",
    Required = true​
}

Jun 26, 2014

Comments

Please login to comment.
Latest blogs
Optimizely Forms - How to add extra data automatically into submission

Some words about Optimizely Forms Optimizely Forms is a built-in add-on by Optimizely development team that enables to create forms dynamically via...

Binh Nguyen Thi | Apr 29, 2024

Azure AI Language – Extractive Summarisation in Optimizely CMS

In this article, I demonstrate how extractive summarisation, provided by the Azure AI Language platform, can be leveraged to produce a set of summa...

Anil Patel | Apr 26, 2024 | Syndicated blog

Optimizely Unit Testing Using CmsContentScaffolding Package

Introduction Unit tests shouldn't be created just for business logic, but also for the content and rules defined for content creation (available...

MilosR | Apr 26, 2024

Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog