At the moment, we're creating the OPAC branch pull-down from "BranchesLoop" which is passed from C4::Auth. This seems a bit sub-optimal to me. I figure we should extend the Koha::Template::Plugin::Branches module so that it returns a loop with branch codes and branch names.
It appears this has been fixed, using the TT plugin for building the list: [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %] <div class="col-sm col-md-3 col-lg-2 order-3 order-sm-4"> <select name="limit" id="select_library" class="form-control"> <option value="">All libraries</option> [% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %] [% FOREACH library IN Branches.all( selected => opac_name ) %] [% NEXT UNLESS library.public %] [% IF library.selected %] <option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option> [% ELSE %] <option value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option> [% END %] [% END %]