While the copy locations filter is a core feature, it surfaces only in the
advanced search page. The current behaviour forces Dojo and all of its
dependencies to be loaded for every catalogue page.
By making it conditional on the advanced search page, we save approximately
600ms to first meaningful paint on the rest of the catalogue pages.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
END;
END;
- # Dojo is required to use the copy locations advanced search filter,
- # therefore, it should always be enabled.
- want_dojo = 1;
+ # Dojo is required for the copy locations advanced search filter
+ IF ctx.page == 'advanced';
+ want_dojo = 1;
+ END;
use_autosuggest = ctx.get_cgf("opac.use_autosuggest");