Show recent visited pages by category

Hi all, I have a page where i can click on certain movies to watch (youtube widget), each movie has a genre. Now, on my homepage i need a list of all the movies of that particular genre i just watched. How would i be able to do that ? A simplified version of my domain model would look like this:  
1 answers

First of all, you need to know the “genre you just watched”. So you will have to store the Genre every time a User has watched a movie or tv-show, for instance as attribute ‘MostRecentGenreWatched’ on entity User.

Then, in a microflow:

  • retrieve the User with XPath constraint "[id = $currentUser]” into for instance ‘CurrentUser’.
  • retrieve the Category having Genre = $CurrentUser/MostRecentGenreWatched.
  • retrieve Movie with XPath constraint Movie/Movie_Category = $Category