Show Blog Related Posts Filter

Dcode warner asked on March 20, 2017 23:03

Using a webpart, marco or transformation. How can I search through the list of posts and pull only those that matches the author field. This is for a 'Related Posts' section. Since there's no easy way to showcase this - I added a new field in the document type for 'Blog posts' called "postBy". This field is a drop down list of all the authors.

{% postBy  #%} 

Can I now say, if {% postBy #%} matches name in 'Blog Post' show "Post Title" and the document URL to that blog post?

Im using Kentico 7 so this is my trivial way of getting the information. Trial and errors.

Correct Answer

Brenden Kehren answered on March 21, 2017 03:33

Assuming you're using another repeater when someone is viewing the actual blog post you can add a where condition to your repeater. In your where condition enter:

postBy = '{%postBy%}'

What this will do is get all the documents where postBy = 'the current documents postBy value'.

1 votesVote for this answer Unmark Correct answer

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