- Colorado State University Libraries
- Research Guides
- CSU Library Website Customization
- "Expand my results" when there are no results
CSU Library Website Customization
- Home
- Exlibris Primo VE Customization
- Exlibris Primo New UI Customization at CSU
- Customize Get It Section
- Moving Send To bar
- Change the hover text for the main menu
- "Expand my results" when there are no results
- Add print journals to E-journals A-Z
- Change "Citation Linker" to "Citation Finder"
- Extra g in front of subject
- Change FRBR setting
- Citation doesn't always pull publisher information
- Availability text change
- Primo Search Logo
- Featured Result Bar
- Resource Recommender
- DOI Search
- BrowZine Primo Integration
- DSpace name change
- Remove "Available at" from Show Only Facet
- DSpace Date Display
- Display MARC 242 field
- Change Brief and Full View Labels
- Customize 5XX Fields
- Add Help Section to Primo Full View
- Add Almetrics to Full View
- Display DSpace Thumbnails in Primo
- Hide Showing expanded results box
- Pre-filter Search for Ebooks
- Create Digital Collections in Primo
- Citation Linker Customization
- SpringShare LibGuides Customization
- Microsoft Office Related
- Colorado Encyclopedia
- Omeka - Creating Avenir Site
Provide a link to "Expand my results" when there are no results
Goal:
When No Records Found provide a customized suggestion and a link to automatically expand search result.
Example we used to test:
- Ageing, disability, and zombies, "The Happy Zombie Sunrise Home"
- Learning XSLT: A Hands-On Introduction to XSLT and XPath
Click the "Try again including items available via interlibrary loan" link, the search will return with "Expand My Results" checked.
Solution:
We borrowed code from St. Olaf College: https://github.com/SarahZum/primo-explore-custom-no-results
- add prm-no-search-result > md-card { display:none; } to the custom1.css
- adding the following code to the custom.js file before the last })();
- no space allowed between template:‘’
- make sure change vid to your own vid.
- rezip the custom folder, upload, deploy.
// Enhance No Results tile
app.controller('prmNoSearchResultAfterController', [function () {
var vm = this;
vm.getSearchTerm = getSearchTerm;
function getSearchTerm() {
return vm.parentCtrl.term;
}
}]);
app.component('prmNoSearchResultAfter',{
bindings: {parentCtrl: '<'},
controller: 'prmNoSearchResultAfterController',
// Yongli's notes. No space nor new lines in side of template ''
template: '<md-card class="default-card zero-margin _md md-primoExplore-theme"><md-card-title><md-card-title-text><span translate="" class="md-headline ng-scope">No records found</span></md-card-title-text></md-card-title><md-card-content><p><span>There are no results matching your search:<blockquote><i>{{$ctrl.getSearchTerm()}}</i>.</blockquote><!-- Update to your domain and view code --><a href="https://colostate-primo.hosted.exlibrisgroup.com/primo-explore/search?query=any,contains,{{$ctrl.getSearchTerm()}}&tab=default_tab&search_scope=Everything&vid=01COLSU&offset=0&sortby=rank&pcAvailability=true"><b>Try again including items available via Interlibrary Loan?</b></a></span></p><p><span translate="" class="bold-text ng-scope">Suggestions:</span></p><ul><li translate="" class="ng-scope">Make sure that all words are spelled correctly.</li><li translate="" class="ng-scope">Try "Almost Everything" or another search scope.</li><li translate="" class="ng-scope">Try different search terms.</li><li translate="" class="ng-scope">Try more general search terms.</li><li translate="" class="ng-scope">Try fewer search terms.</li></ul><!-- Other helpful links --><p><b><a href="https://lib.colostate.edu/services/ask-us/">Ask us for Help Now</a></b></p><p><b><a href="https://lib2.colostate.edu/staff-directory/pub/?search=sub&subjectSearch=-1">Contact a Subject Librarian for Assistance</a></b></p></md-card-content></md-card>'
});