Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Find pages with specific propertydata in block

Vote:
 

Isn't FindAllPagesWithCriteria or FindPagesWithCriteria suppose to work on properties inside a Page block or a Global block?

var repository = ServiceLocator.Current.GetInstance();

            PropertyCriteriaCollection criterias = new PropertyCriteriaCollection();

                criterias.Add(new PropertyCriteria()
                {
                    Condition = CompareCondition.Equal,
                    Required = false,
                    Name = "Heading",
                    Type = PropertyDataType.String,
                    Value = "My heading"
                });


            PageDataCollection result = repository.FindAllPagesWithCriteria(ContentReference.StartPage, criterias,"sv",new LanguageSelector("sv"));
#121407
May 08, 2015 16:17
Vote:
 

Hi Thomas,

I don't think that's possible. You could however search for a specific block in a content area, but I'm not sure if that's something you need.

Check this blog: http://talk.alfnilsson.se/2013/06/05/find-pages-containing-a-certain-content-in-a-contentarea/

Patrick

#121415
May 10, 2015 10:35
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.