Could you move this conditional logic into the `_custom_fragment_header.erb` file?