Try our conversational search powered by Generative AI!

Santosh Achanta
Jun 26, 2014
  1833
(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
Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog

The A/A Test: What You Need to Know

Sure, we all know what an A/B test can do. But what is an A/A test? How is it different? With an A/B test, we know that we can take a webpage (our...

Lindsey Rogers | Apr 15, 2024

.Net Core Timezone ID's Windows vs Linux

Hey all, First post here and I would like to talk about Timezone ID's and How Windows and Linux systems use different IDs. We currently run a .NET...

sheider | Apr 15, 2024

What's new in Language Manager 5.3.0

In Language Manager (LM) version 5.2.0, we added an option in appsettings.json called TranslateOrCopyContentAreaChildrenBlockForTypes . It does...

Quoc Anh Nguyen | Apr 15, 2024

Optimizely Search & Navigation: Boosting in Unified Search

In the Optimizely Search & Navigation admin view, administrators can set a certain weight of different properties (title, content, summary, or...

Tung Tran | Apr 15, 2024