Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Santosh Achanta
Jun 26, 2014
  1836
(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
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

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog