Adding a header to a views glossary I currently have a glossary view set up using attachments in views using Drupal 7. I would like to have a header on top of the list of results displaying an  element of the currently selected letter with a divider (top image). So far I've tried setting up a footer on the attachment but can't seem to figure a way to extract the current letter into the footer (bottom image).

 .

I would like the view to look the same way the top image does. I've hardcoded the letter 'A' into the footer but am looking for a way to make it change with the letter selection.
You need to be able to perform business logic (php) in your Views header (or footer) to perform this task.

The Views header or footer should be able to accept PHP, just change the input filter to PHP. If that input filter is not available, you'll need to enable the PHP Filter module (core, optional) first.

Once you can use PHP in the Views attachment header or footer you can include logic to look at the selected glossary item such as:

$term = check_plain($_GET['glossary_term');
echo "&lt;div id='selected-glossary-term'&gt;" . $term . "&lt;/div&gt;";


Then use whatever CSS you need in your theme or module to make this Letter appear however you wish.