Closed pirog closed 9 years ago
Before the view is built you will want to get rid of the random sort and add a filter containing the node id in the relevant variable... but only if it exists of course.
@pirog ok so these "technically" "work" now, but I cheated by changing the views config in features. So the behavior for when a variable is not set is not right (it displays a default president/robot instead of a random one). More work to be done! Perhaps we can discuss this issue when you return if I haven't cracked it by then
quotes around "technically" and "work" certainly inspire significant levels of confidence :)
yeah lets def go over it monday!!!!!!
So now that the admin can set a favorite president and a favorite boss we should have those settings actually do something. An easy thing first thing would be having the president/robot picture that appears at the top of /presidents and /robots to be set using these settings.
To do this we will need to hook into views. Here are a list of views hooks that could be helpful https://api.drupal.org/api/views/views.api.php/group/views_hooks/7
Basically we should have the two views displays for this show a random president UNLESS the favorite robot/president setting is set.