alphagov/slimmer — pull request #61 by JordanHatch (2014-02-05 15:23:09+00:00)
Title: Add the ability to hide section titles in related items

@AmyWhitney and I have been looking into hiding the section titles in the related items list for a select few pieces of Mainstream content, to see if it improves the number of people who interact with the links.

This pull request adds a new Slimmer header `X-Slimmer-Related-Section-Titles`. It is exposed to the [related items template](https://github.com/alphagov/static/blob/master/app/views/root/related.raw.html.erb) in Static through a new method `show_related_section_titles?` in the `RelatedItemsInserter` processor.

When the header is set to false, the method will return `false`. If it's not present, or set to a value other than false, it will return `true`. This will be used to maintain the existing behaviour across content left out of this experiment.

Eventually, I imagine that we'll remove this header once we've finished running this test.