If you look at other custom sections (for example seo checker) and you try to search it will show the content results. I don't know if you can override that with your own search, but the easiest way to find out is to look at the source code and see how the search for content works.
It's a little trickier than that. So essentially it swaps it out altogether for all requests. You can try to modify it to do certain behaviors based on certain factors. The issue I ran into right away was the AngularJs caching mechanism. So think of it as a starting point and you'll have to flesh it out for your specific need.
Umbraco 7 Custom Section : Change top left search box
Hello,
I have developed a custom section for Umbraco 7 (Normal angular JS way).
Is it possible to change the behaviour/look of the Search box at the top left (above the tree) ?
If not, is it possible to search on a custom index instead of the Internal one ?
Many thanks
Hello,
If you look at other custom sections (for example seo checker) and you try to search it will show the content results. I don't know if you can override that with your own search, but the easiest way to find out is to look at the source code and see how the search for content works.
Jeroen
OK thank you.
I knew about SEO Checker search, I also tried other packages with custom section (Calendar, Merchello), it's all the same.
I just checked the source code (search.controller.js, search.service.js), it doesn't seem that you can change it (but i'm might be wrong...)
I just stumbled over this, and would like to implement the same behaviour. Has anyone solved this?
In theory this should be possible.
If you got this file in your website umbraco\Views\directives\umb-navigation.html you see the code that is used to wire up the tree and search box.
The $scope in this directive has a property called currentSection.
So you can try to update the umb-navigation.html to check which section you are in and try to show a different search box.
Dave
Comment author was deleted
Bump. I need a custom search too but I can't change the core files because it's a package that needs it's own custom search.
Comment author was deleted
Feature request logged: http://issues.umbraco.org/issue/U4-6461
Comment author was deleted
Woohoo, I found a workaround: https://github.com/kgiszewski/LearnUmbraco7/blob/master/Chapter%2011%20-%20Working%20with%20AngularJs%20for%20Customizing%20the%20Backoffice/06%20-%20Interceptors.md
Hi Kevin,
can I only use the interceptor when I'm on my custom section? So the normal behavior is used unless on my custom section?
Regards David
Comment author was deleted
It's a little trickier than that. So essentially it swaps it out altogether for all requests. You can try to modify it to do certain behaviors based on certain factors. The issue I ran into right away was the AngularJs caching mechanism. So think of it as a starting point and you'll have to flesh it out for your specific need.
is working on a reply...