On my template I have specially preserved Place Holder
for Search option. In order to learn install and edit this part, I have
first installed and the XSLT utility from this link
but
in this PDF file I couldn't find any clue how can I install this
utility step-by-step. I managed to install this utility on my
installation on Umbraco but I can't fin any step-by-step instrucions
(yes, I google it;) what to do after installing this package, how to
configure it and fit it with my template!?
Any help is appreciated and many thanks in advance for prompt replies.
The basic XSLTsearch package will create a search page for you, along with a template and macro to show a search box and perform the searching for you. The first step is to get this working correctly. For the moment, you want to ignore the specially preserved place holder on your main site template(s), which I assume is a search box that will appear on every page of your site. We'll make that work next, but until the main search page is working there's no need to worry about the search box in the banner of all pages.
Note: though XSLTsearch works fine with MVC mode templates but the default template that is installed with the XSLTsearch package is based on WebForms. That is, it uses asp:Content tags rather than MVC's views. Let us know if you're using MVC mode, but I'll assume you're using WebForms (as has been the norm with Umbraco 4 and 6).
Once you have the basic XSLTsearch installed, you'll have a 'search' page on your site. When you visit that page of your site (usually at /search.aspx) you'll see a search box. That search box is generated by the XSLTsearch macro. If you type into the search box and click the search button the page will refresh and you'll see any results.
You'll want to modify the markup and template hierarchy for the XSLTsearch template to better match the design of your site's look-n-feel; the default markup is for using the Runway sample site that is rarely used anymore. You can also change the macro parameters on the XSLTsearch template (that's where the macro is inserted) to your liking to produce the results you're looking for.
When done with this, you're ready for getting your special search box to work.
The second step is to make searching work from every page of your site using your special search box. This is easily done. All you need to do is set the form action= for the search box in your banner to send the form parameters to the existing and functioning search page's url (that page we got working above). In particular, you also need to set the name of your search box to be 'search' because that's the parameter name XSLTsearch will be looking for.
Your html markup for the search box in the banner will be something like this:
TADA! That's all there is to making your special template work. No special markup or inserting of macros or anything like that.
You might decide that, since you have a search box in the banner of every page, that you don't need XSLTsearch to also put a search box on the search page itself. That's easily removed by setting the searchBoxLocation= macro parameter in the XSLTsearch template.
I will also mention that if you're using MVC, you would probably be better served by using ezSearch (http://our.umbraco.org/projects/website-utilities/ezsearch) rather than XSLTsearch.
You get all the same great features of XSLTsearch but with three additional features:
Everything is already MVC-based (views and razor code)
Limited searching within the Media section (XSLTsearch can't do this)
No limit to the amount of data searched (ezSearch uses the Examine/Lucene search and is blisteringly fast)
How you approach integrating ezSearch with your site is exactly the same as with XSLTsearch. First, install it and get the standard search page working. Second, update the action= form parameter for your custom search box (use <input type="text" name="q" /> instead of <input type="text" name="search" /> because ezSearch expects the 'q' parameter name. A helpful blog post can be found at http://www.theoutfield.net/blog/2013/06/simple-umbraco-searching-with-ezsearch
I have followed your reply in detail and I have understood most prt of the instructions but some parts I didn't so I would like to you write what is the issue for me, since I am still amateur in Umbraco (I hope not to long;):
I
"For the moment, you want to ignore the specially preserved place
holder on your main site template(s), which I assume is a search box
that will appear on every page of your site."
Please se the screenshot which represents list of Place holders for my template.
It looks like there is no Place holder reserved specially for Searchbox but there is still 'dummy' Searchbox?
II
"Note: though XSLTsearch works fine with MVC mode templates but the default template that is installed with the XSLTsearch package is based on WebForms. That is, it uses asp:Content tags rather than MVC's views. Let us know if you're using MVC mode, but I'll assume you're using WebForms (as has been the norm with Umbraco 4 and 6)."
I am little confused here, as I remember I have installed Business Starterkit and my site template which are working great. I had to install XSLT search afterwards when I noticed that temaplate Searchbox is only 'dummy' Searchbox. Installation of Umbraco is only 8 days old (most recent one). Now, how can I check if I am using MVC mode or the WebForms?
III
"Once you have the basic XSLTsearch installed, you'll have a 'search' page on your site. When you visit that page of your site (usually at /search.aspx) you'll see a search box. That search box is generated by the XSLTsearch macro. If you type into the search box and click the search button the page will refresh and you'll see any results."
This is corerect adn I see /search.aspx Only thing is that it looks like it is currentli not working because even when I type simple value like 'a' or 'e', it doesn't find any page and that is not correct because I have many pages and content.
IV
"You'll want to modify the markup and template hierarchy for the XSLTsearch template to better match the design of your site's look-n-feel; the default markup is for using the Runway sample site that is rarely used anymore. You can also change the macro parameters on the XSLTsearch template (that's where the macro is inserted) to your liking to produce the results you're looking for."
Under Macro parameter I see this
and to me it looks like all is already set-up and working so I guess, in this phase, I won't have to change anything yet?
V
"All you need to do is set the form action= for the search box in your banner to send the form parameters to the existing and functioning search page's url (that page we got working above)."
I really don't understand this part "..for the search box in your banner" because I don't have any banner on my website? Also in which exact part of Ubraco administration should I change this? Is it under Developer section, is it under Settings->Templates->My template or somewhere else?
VI
"In particular, you also need to set the name of your search box to be 'search' because that's the parameter name XSLTsearch will be looking for."
Where can I find this? Please see screenshot
this is the part of code for my template and I have found three keywords for 'Search', that is the best I could do.
VII
"Your html markup for the search box in the banner will be something like this:
"
Do I have to add extra code to my template or should I change some existing code?
VIII
"You might decide that, since you have a search box in the banner of every page, that you don't need XSLTsearch to also put a search box on the search page itself. That's easily removed by setting the searchBoxLocation= macro parameter in the XSLTsearch template.
I saw your blog it is simple and with clean looks, search is working great. Please note that I need more detailed explanation for above sentence (VIII), because I really don't understand it at all and what you are trying to tell me..
I am sorry for all the questions but I really didn't know that I have go through all this in order to 'connect' my template with one simple Searchbox.. Umbraco is great software but I have enough long-time experience in order to say that Umbraco is little too complicated for first-time users (even if they are long-time CMSs experinced users).
Thanks in advance, your prompt reply really means a lot to me.
can anyone help me with search function? It is very urgent and really means a lot to me because I struggling with this for long time and still can't find the solution..
Sorry for the slow response... had a funeral to attend. Back at the office now.
Thanks for your comments and screenshots, they help a lot. I apologize that I wasn't more clear... I well remember being new to Umbraco and people made it sound so simple and I ended up feeling foolish for not understanding them. Once you learn the big concepts of Umbraco (document types and properties, templates, macros and razor logic) you will agree it is not only easy but fun to work with Umbraco. Until then... it can be a bit frustrating because we are often sloppy with our words. I'll try to do better and hopefully you'll learn along the way.
Your wire diagram of the site shows a search box in the banner of the site. That's what we'll make work properly, but first we need to get the main search page to work by itself. When that's working it will take 5 minutes to get the search box in the banner to work. Thus, I'm not going to address some of your questions right now, but don't worry, we'll cover them soon.
I can see from the screenshot that you're running Umbraco 6. That means that you are also using Webforms Masterpages templates rather than MVC. We should confirm that though...
In the Umbraco backoffice, please click the 'About' button in the
top-right corner and let me know exactly which version of Umbraco
you are running.
Please open the ~/config/umbracoSettings.config file from Windows
Explorer (open in Notepad or whatever) and look for the
<defaultRenderingEngine> line. Is it set to WebForms?
Being sure of these things will ensure we don't waste our time.
Now, can you show me the contents of the XSLTsearch template (in the Settings section of the Umbraco backoffice)? In particular, I want to know what you have for the Macro entry and it's parameters. It will look similar to this but I want to know what YOU have for the various parameters:
Also, I need is to understand how your content tree is organized. In particular, where is the homepage and various content pages, and where is the search page? For instance, you might have something like this:
CONTENT
Home
Products
ProductA
ProductB
News
News Item 1
News Item 2
News Item 3
About Us
Legal Notices
Search
Finally, just to rule out a potential problem... select the Search page from the Content section of the Umbraco backoffice. Now click the 'Properties' tab and confirm that the Document Type is XSLTsearch, and the Template is also XSLTsearch.
That's it. With that information to understand and confirm my understanding of your umbraco site we should be able to get the search.aspx page working with little effort, and then the search box at the top of every page soon afterward.
Problems with installing Xslt search utility
Hello,
On my template I have specially preserved Place Holder for Search option. In order to learn install and edit this part, I have first installed and the XSLT utility from this link
http://our.umbraco.org/projects/website-utilities/xsltsearch
and followed instructions from
http://our.umbraco.org/FileDownload?id=1588ow
but in this PDF file I couldn't find any clue how can I install this utility step-by-step. I managed to install this utility on my installation on Umbraco but I can't fin any step-by-step instrucions (yes, I google it;) what to do after installing this package, how to configure it and fit it with my template!?
Any help is appreciated and many thanks in advance for prompt replies.
Cheers;)
Adi
Hi, Adi,
The basic XSLTsearch package will create a search page for you, along with a template and macro to show a search box and perform the searching for you. The first step is to get this working correctly. For the moment, you want to ignore the specially preserved place holder on your main site template(s), which I assume is a search box that will appear on every page of your site. We'll make that work next, but until the main search page is working there's no need to worry about the search box in the banner of all pages.
Note: though XSLTsearch works fine with MVC mode templates but the default template that is installed with the XSLTsearch package is based on WebForms. That is, it uses asp:Content tags rather than MVC's views. Let us know if you're using MVC mode, but I'll assume you're using WebForms (as has been the norm with Umbraco 4 and 6).
Once you have the basic XSLTsearch installed, you'll have a 'search' page on your site. When you visit that page of your site (usually at /search.aspx) you'll see a search box. That search box is generated by the XSLTsearch macro. If you type into the search box and click the search button the page will refresh and you'll see any results.
You'll want to modify the markup and template hierarchy for the XSLTsearch template to better match the design of your site's look-n-feel; the default markup is for using the Runway sample site that is rarely used anymore. You can also change the macro parameters on the XSLTsearch template (that's where the macro is inserted) to your liking to produce the results you're looking for.
When done with this, you're ready for getting your special search box to work.
The second step is to make searching work from every page of your site using your special search box. This is easily done. All you need to do is set the form action= for the search box in your banner to send the form parameters to the existing and functioning search page's url (that page we got working above). In particular, you also need to set the name of your search box to be 'search' because that's the parameter name XSLTsearch will be looking for.
Your html markup for the search box in the banner will be something like this:
TADA! That's all there is to making your special template work. No special markup or inserting of macros or anything like that.
You might decide that, since you have a search box in the banner of every page, that you don't need XSLTsearch to also put a search box on the search page itself. That's easily removed by setting the
searchBoxLocation=
macro parameter in the XSLTsearch template.This is exactly the technique I use on my blog, for instance. http://blog.percipientstudios.com/
cheers,
doug.
I will also mention that if you're using MVC, you would probably be better served by using ezSearch (http://our.umbraco.org/projects/website-utilities/ezsearch) rather than XSLTsearch.
You get all the same great features of XSLTsearch but with three additional features:
How you approach integrating ezSearch with your site is exactly the same as with XSLTsearch. First, install it and get the standard search page working. Second, update the action= form parameter for your custom search box (use
<input type="text" name="q" />
instead of<input type="text" name="search" />
because ezSearch expects the 'q' parameter name. A helpful blog post can be found at http://www.theoutfield.net/blog/2013/06/simple-umbraco-searching-with-ezsearchcheers,
doug.
Hello Doug,
thank you very much for prompt reply!
I have followed your reply in detail and I have understood most prt of the instructions but some parts I didn't so I would like to you write what is the issue for me, since I am still amateur in Umbraco (I hope not to long;):
I
Please se the screenshot which represents list of Place holders for my template.
It looks like there is no Place holder reserved specially for Searchbox but there is still 'dummy' Searchbox?
II
"Note: though XSLTsearch works fine with MVC mode templates but the default template that is installed with the XSLTsearch package is based on WebForms. That is, it uses asp:Content tags rather than MVC's views. Let us know if you're using MVC mode, but I'll assume you're using WebForms (as has been the norm with Umbraco 4 and 6)."
I am little confused here, as I remember I have installed Business Starterkit and my site template which are working great. I had to install XSLT search afterwards when I noticed that temaplate Searchbox is only 'dummy' Searchbox. Installation of Umbraco is only 8 days old (most recent one). Now, how can I check if I am using MVC mode or the WebForms?
III
"Once you have the basic XSLTsearch installed, you'll have a 'search' page on your site. When you visit that page of your site (usually at /search.aspx) you'll see a search box. That search box is generated by the XSLTsearch macro. If you type into the search box and click the search button the page will refresh and you'll see any results."
This is corerect adn I see /search.aspx Only thing is that it looks like it is currentli not working because even when I type simple value like 'a' or 'e', it doesn't find any page and that is not correct because I have many pages and content.
IV
"You'll want to modify the markup and template hierarchy for the XSLTsearch template to better match the design of your site's look-n-feel; the default markup is for using the Runway sample site that is rarely used anymore. You can also change the macro parameters on the XSLTsearch template (that's where the macro is inserted) to your liking to produce the results you're looking for."
Under Macro parameter I see this
and to me it looks like all is already set-up and working so I guess, in this phase, I won't have to change anything yet?
V
"All you need to do is set the form action= for the search box in your banner to send the form parameters to the existing and functioning search page's url (that page we got working above)."
I really don't understand this part "..for the search box in your banner" because I don't have any banner on my website? Also in which exact part of Ubraco administration should I change this? Is it under Developer section, is it under Settings->Templates->My template or somewhere else?
VI
"In particular, you also need to set the name of your search box to be 'search' because that's the parameter name XSLTsearch will be looking for."
Where can I find this? Please see screenshot
this is the part of code for my template and I have found three keywords for 'Search', that is the best I could do.
VII
"Your html markup for the search box in the banner will be something like this:
"Do I have to add extra code to my template or should I change some existing code?
VIII
"You might decide that, since you have a search box in the banner of every page, that you don't need XSLTsearch to also put a search box on the search page itself. That's easily removed by setting the searchBoxLocation= macro parameter in the XSLTsearch template.
This is exactly the technique I use on my blog, for instance. http://blog.percipientstudios.com/"
I saw your blog it is simple and with clean looks, search is working great. Please note that I need more detailed explanation for above sentence (VIII), because I really don't understand it at all and what you are trying to tell me.. I am sorry for all the questions but I really didn't know that I have go through all this in order to 'connect' my template with one simple Searchbox.. Umbraco is great software but I have enough long-time experience in order to say that Umbraco is little too complicated for first-time users (even if they are long-time CMSs experinced users).
Thanks in advance, your prompt reply really means a lot to me.
Cheers, Adi
Any suggestions?
Thank you, Adi
Hello,
can anyone help me with search function? It is very urgent and really means a lot to me because I struggling with this for long time and still can't find the solution..
Greetings, Adi
Hi, Adi,
Sorry for the slow response... had a funeral to attend. Back at the office now.
Thanks for your comments and screenshots, they help a lot. I apologize that I wasn't more clear... I well remember being new to Umbraco and people made it sound so simple and I ended up feeling foolish for not understanding them. Once you learn the big concepts of Umbraco (document types and properties, templates, macros and razor logic) you will agree it is not only easy but fun to work with Umbraco. Until then... it can be a bit frustrating because we are often sloppy with our words. I'll try to do better and hopefully you'll learn along the way.
Your wire diagram of the site shows a search box in the banner of the site. That's what we'll make work properly, but first we need to get the main search page to work by itself. When that's working it will take 5 minutes to get the search box in the banner to work. Thus, I'm not going to address some of your questions right now, but don't worry, we'll cover them soon.
I can see from the screenshot that you're running Umbraco 6. That means that you are also using Webforms Masterpages templates rather than MVC. We should confirm that though...
In the Umbraco backoffice, please click the 'About' button in the top-right corner and let me know exactly which version of Umbraco you are running.
Please open the ~/config/umbracoSettings.config file from Windows Explorer (open in Notepad or whatever) and look for the
<defaultRenderingEngine>
line. Is it set toWebForms
?Being sure of these things will ensure we don't waste our time.
Now, can you show me the contents of the XSLTsearch template (in the Settings section of the Umbraco backoffice)? In particular, I want to know what you have for the Macro entry and it's parameters. It will look similar to this but I want to know what YOU have for the various parameters:
Also, I need is to understand how your content tree is organized. In particular, where is the homepage and various content pages, and where is the search page? For instance, you might have something like this:
Finally, just to rule out a potential problem... select the Search page from the Content section of the Umbraco backoffice. Now click the 'Properties' tab and confirm that the Document Type is XSLTsearch, and the Template is also XSLTsearch.
That's it. With that information to understand and confirm my understanding of your umbraco site we should be able to get the search.aspx page working with little effort, and then the search box at the top of every page soon afterward.
cheers,
doug.
is working on a reply...