Display Blog Posts by featured blogger

Rachel Shearer asked on July 14, 2014 15:33

I have a role "feature blogger" and when the user selects the featured bloggers name from the blog options,I would like them to be taken to a page where they see a list of the selected featured bloggers posts. I did find this link: http://devnet.kentico.com/forums/f65/fp8/t43109/how-to-display-list-of-distinct-blog-authors-na but I can't seem to find on Kentico 8 where I would place the query? The other way I have tried was to attach the userid to the href of the featured blogger link and used an if statement in the code behind to attach a where condition to the repeater for the blog posts, but this hasn't worked. Any help would be appreciated. Many thanks Rachel

Correct Answer

Brenden Kehren answered on July 15, 2014 13:41

In v8, the best place to put that query is in the CMS.BlogPost document type and not the Users as I mentioned in that post. Then in your custom query repeater choose that query and set your other properties and you should be set. I believe I left off the ##WHERE## statement at the end of that query as well. This will allow for the WHERE clause to be passed in.

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.