I just plugged in XSLTsearch and it's working great! Thanks for putting this together.
I've placed the search box on the sidebar of my webpage so that it appears next to all articles. When I perform a search, all the search results appear under the search box, still in the bar.
Is there an easy way to open up another page to display search results? I imagine so, but can't quite connect the dots.
The Search page (/search.aspx) that installed automatically in the content tree doesn't actually open, and I tried changing the source node referenced in the code
I think you just have to get your search to post to the search page instead of itself for the functionality you're after. so your search form should look something like this:
Thank you for your quick response! I tried karma-ing Doug, but my own apparently isn't high enough to count yet (!). I promise to go back once I'm over 70, like it says :) In the meantime, I'm sure we will work out some financial contribution once we get paid for the project that this is for.
Down to Business
Source does indeed seem to be the top level node, so that's good.
I'm still (in true n00b fashion) having trouble understanding how the nifty code you provided gets worked into the template. I have the macro
but results still appear on the original page. I'm going to poke around in the XSLT file and ask a couple guys in the office too, but would appreciate a little more guidance! Thank you :)
that will determine at least whether your search template is working how you want it to
as for your form tag, any reason why your trying to do a get rather than a post? does your input have the name search? like
<inputname="search"id="search" type="text" />
take off the runat=server tag from your form if you have one. maybe post the full code within and including the form tags here so it's a bit easier to see whats going on....
Thanks for the help on this ... I realized at one point that the XSLT search project page says it works well up to a couple thousand pages, and since we're going to be migrating over 30,000 I'll need to find something else, although I still wish we could have figured this one out! Thanks though :)
********* UPDATED - I had comflicting code on my site that prevented this setup from working correctly, however if you follow the steps that I outlined here you should be able to drop in your search field anywhere you like on your site *********
Hi everyone,
I'm still having a little trouble with this topic. I tried to work off of wolulcmit's example but I don't seem to be getting it to work right. My goal is to have a search bar that I can easily place on different specific pages of my site that would allow people to search for this specific kind of result....
SO...
I set up a new XSLT file with clean macro. (ResearchInterestSearch.xslt)
I enabled the corresponding macro to: Use in editor so that I could easily drop it inside my pages.
Then I created a page (/test/) on my site and added the above macro to this page via the WYSIWYG editor.
Now, I also have a page /faculty-research/search/ which is where I want the results to be shown. On this page I have the XSLTsearch macro placed on the page via the WYSIWYG editor with these settings:
If I navigate directly to /faculty-research/search/ and search from there the results are pulled up great on that page... but I need to be able to search from other pages like /test/. I don't want the results to be shown on the other pages like /test/ or /contact/ ect... so I need a landing page for my results. Hopefully /faculty-research/search/ if we can make that work.
Currently...
When I visit /test/ and hit SEARCH the page refreshes, but no results are returned and the page doesn't move to the desired landing page of /faculty-research/search/
Solution..?
So what am I missing? I'm hoping to be able to just drop in a macro through the WYSIWYG editor on certain pages, as well as reference a macro on my homepage template. Any additional information would be great to help me get past this little hurdle.
**Update, I was reading more on this topic (here) and Doug mentions that you can't have a <form> inside another <form>. As Doug mentions "That's a problem with asp.net generally, not XSLTsearch." So that might be my immediate problem...
I noticed that when I viewed the generated source code of the /test/ page that no <form> </form> tags were generated around my search bar... thus why it's not redirecting to the results page probably..... HOWEVER.. if someone could please still read my set up and confirm that I have things in the right palce to do this.. that would help too.
...now off to try to figure out why I have my whole content area wrapped in a form tag... hmmmmmmm.
My first guess is check that your form tags are being rendered correctly from your /test/ page perhaps its getting mangled once the WYSWYG editor gets a hold of it. If so you may need to move your form tags out of your ResearchInterestSearch.xslt macro and into the masterpage for that template to surround the richtext field that you're trying to render (hope that makes sense)
I hope that won't be the case. I really only want to have this search bar on like 3 pages. I would certainly prefer not to have it in the template for which I have hundreds of pages that use that template... nor would I like to create a whole new template to accomodate using this search feature.
I'll see what happens once I figure out why I have a <form> inside a <form>. Hopefully, the inner one is getting stripped out automatically..
Does anyone have <form> tags in the .XSLT files that are used with macros place in the WYSIWYG editor? That would certainly be helpful to know if it's possible...
**Update,.. I commented out the <form runat="server"> code in my template that I have wrapping around my main content area and things immediately worked. My XSLT began rendering the
just fine and the redirection to the results page worked great too!... So it looks like my solution above is all correct.
... I just need to remember why I had to wrap that content in a form tag... (completly unrelated issue) anyway... thanks! for everyones help on this post.. and the others that I read that helped get me through this issue today.
Location of Search Results for XSLTsearch
I just plugged in XSLTsearch and it's working great! Thanks for putting this together.
I've placed the search box on the sidebar of my webpage so that it appears next to all articles. When I perform a search, all the search results appear under the search box, still in the bar.
Is there an easy way to open up another page to display search results? I imagine so, but can't quite connect the dots.
The Search page (/search.aspx) that installed automatically in the content tree doesn't actually open, and I tried changing the source node referenced in the code
umbraco:Macro source="1157"
None of those efforts worked, and any direction would be much appreciated! Thanks :)
I think you just have to get your search to post to the search page instead of itself for the functionality you're after.
so your search form should look something like this:
and then your 'search' node just needs to use the search template which contains the xslt search macro (also need to be saved and published).
I think the source in this case is the top level node that you want Xslt to search within.
Xslt search is brilliant eh!
give Doug some Karma if you havent already
- Tim
Thank you for your quick response! I tried karma-ing Doug, but my own apparently isn't high enough to count yet (!). I promise to go back once I'm over 70, like it says :) In the meantime, I'm sure we will work out some financial contribution once we get paid for the project that this is for.
Down to Business
Source does indeed seem to be the top level node, so that's good.
I'm still (in true n00b fashion) having trouble understanding how the nifty code you provided gets worked into the template. I have the macro
and tried wrapping it with
but results still appear on the original page. I'm going to poke around in the XSLT file and ask a couple guys in the office too, but would appreciate a little more guidance! Thank you :)
What happens when you hit your search page with something like the following?
http://www.yoursite.com/search.aspx?search=enter-a-search-term-here
that will determine at least whether your search template is working how you want it to
as for your form tag, any reason why your trying to do a get rather than a post?
does your input have the name search?
like
take off the runat=server tag from your form if you have one.
maybe post the full code within and including the form tags here so it's a bit easier to see whats going on....
- Tim
Thanks for the help on this ... I realized at one point that the XSLT search project page says it works well up to a couple thousand pages, and since we're going to be migrating over 30,000 I'll need to find something else, although I still wish we could have figured this one out! Thanks though :)
********* UPDATED - I had comflicting code on my site that prevented this setup from working correctly, however if you follow the steps that I outlined here you should be able to drop in your search field anywhere you like on your site *********
Hi everyone,
I'm still having a little trouble with this topic. I tried to work off of wolulcmit's example but I don't seem to be getting it to work right. My goal is to have a search bar that I can easily place on different specific pages of my site that would allow people to search for this specific kind of result....
SO...
I set up a new XSLT file with clean macro. (ResearchInterestSearch.xslt)
I enabled the corresponding macro to: Use in editor so that I could easily drop it inside my pages.
Then I created a page (/test/) on my site and added the above macro to this page via the WYSIWYG editor.
Now, I also have a page /faculty-research/search/ which is where I want the results to be shown. On this page I have the XSLTsearch macro placed on the page via the WYSIWYG editor with these settings:
If I navigate directly to /faculty-research/search/ and search from there the results are pulled up great on that page... but I need to be able to search from other pages like /test/. I don't want the results to be shown on the other pages like /test/ or /contact/ ect... so I need a landing page for my results. Hopefully /faculty-research/search/ if we can make that work.
Currently...
When I visit /test/ and hit SEARCH the page refreshes, but no results are returned and the page doesn't move to the desired landing page of /faculty-research/search/
Solution..?
So what am I missing? I'm hoping to be able to just drop in a macro through the WYSIWYG editor on certain pages, as well as reference a macro on my homepage template. Any additional information would be great to help me get past this little hurdle.
THANKS!
**Update, I was reading more on this topic (here) and Doug mentions that you can't have a <form> inside another <form>. As Doug mentions "That's a problem with asp.net generally, not XSLTsearch." So that might be my immediate problem...
I noticed that when I viewed the generated source code of the /test/ page that no <form> </form> tags were generated around my search bar... thus why it's not redirecting to the results page probably..... HOWEVER.. if someone could please still read my set up and confirm that I have things in the right palce to do this.. that would help too.
...now off to try to figure out why I have my whole content area wrapped in a form tag... hmmmmmmm.
My first guess is check that your form tags are being rendered correctly from your /test/ page
perhaps its getting mangled once the WYSWYG editor gets a hold of it.
If so you may need to move your form tags out of your ResearchInterestSearch.xslt macro and into the masterpage for that template to surround the richtext field that you're trying to render (hope that makes sense)
- Tim
Hi Tim,
I hope that won't be the case. I really only want to have this search bar on like 3 pages. I would certainly prefer not to have it in the template for which I have hundreds of pages that use that template... nor would I like to create a whole new template to accomodate using this search feature.
I'll see what happens once I figure out why I have a <form> inside a <form>. Hopefully, the inner one is getting stripped out automatically..
Does anyone have <form> tags in the .XSLT files that are used with macros place in the WYSIWYG editor? That would certainly be helpful to know if it's possible...
**Update,.. I commented out the <form runat="server"> code in my template that I have wrapping around my main content area and things immediately worked. My XSLT began rendering the
just fine and the redirection to the results page worked great too!... So it looks like my solution above is all correct.
... I just need to remember why I had to wrap that content in a form tag... (completly unrelated issue) anyway... thanks! for everyones help on this post.. and the others that I read that helped get me through this issue today.
on other page that you want to show result but the xslt umbraco macro between <form> here </form>
is working on a reply...