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

Try our conversational search powered by Generative AI!

Getting tags of a particular blog with custom attribute

Vote:
 

Is it possible to extract tags from a blog  which has a bool attribute set to true easily, possibly using queries?

#38479
Apr 12, 2010 12:07
Vote:
 

You could do something like this:

1) Get all blogs that has attribute=true
2) Get all tags for these blogs

Code:

            BooleanCriterion booleanCriterion = new BooleanCriterion();
            booleanCriterion.Value = true;

            BlogQuery blogQuery = new BlogQuery();
            blogQuery["Attribute"] = booleanCriterion;

            BlogCollection blogCollection =
                QueryHandler.GetQueryResult(blogQuery);

            //Get tags for the first blog
            TagCollection tagCollection = blogCollection[0].Tags;

Karoline

 

#38710
Apr 20, 2010 12:36
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* 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.