Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm new to umbraco, so sorry if my questions sounds dumb :P. I have installed umbraco 4.8 and i installed xsltsearch 3.0.4. The installation is okay, but whenver I open the ./search.aspx it only shows the search box and the submit button nothing else.Also, when I try to use it, it doesn't show anything, it just stay as it is.what seems to be the problem?
Could you give an example of your setup?
One of the first things I see asked when someone has troubles with this package is: do you have a form tag, and does it have an action and what is the method?
What happens if you do a manual GET search, such that: /search.aspx?search=test ?
It shows this if i dosearch.aspx?search=test ?
I dont have a form tag. What I did was copy this from the XSLTSearch template and paste it on the master page under the "cp_content" contentpalceholder:
<umbraco:Macro runat="server" Alias="XSLTsearch" macroAlias="XSLTsearch" source="-1" searchFields="@nodeName,metaKeywords,metaDescription,bodyText" previewFields="bodyText,metaDescription" previewType="beginning" searchBoxLocation="bottom" resultsPerPage="5" previewChars="255" showPageRange="0" showOrdinals="0" showScores="0" showStats="1"> </umbraco:Macro>
(thanks for the new post)
XSLTsearch is a macro that will be inserted in the template of your search page. When you visit the search page you should see a text field and button that says 'search' next to it, probably in the middle of your page (that's usually where the macro will be inserted).
This is NOT the same as a search field that you include on the banner of your site, as many sites do. We can make that work with XSLTsearch too but let's take this one step at a time. The first thing is to visit the page with the XSLTsearch macro on it's template. Typically this will be the /search.aspx page and will live alongside all the other pages, directly beneath your site's home page, like this:
CONTENT- Home- - Products- - About Us- - Search
If you have a different site structure please let us know as that will make a difference.
So... go to the search page and you should see the text box and button generated by XSLTsearch (hint: if you view the page's html source you'll see a lot of xsltsearch classes and id's in the markup; that means the macro is working).
Now enter a word that appears in the name of one of your site's pages (perhaps About in the simple content tree I showed above) and click the button. The search.aspx page will reload and tell you what term was searched for and give a list of links to any pages with that term in it. You'll see the text box and button to search again will also appear.
This is the first thing to make sure works properly. Does it? If not, what happens?
Once we get the search.aspx page sorted out we can handle any other issues easily.
Okay, you should have a form tag that looks something like this:
<form action="/search.aspx" method="GET"> <!-- your form controls here, and/or the macro within somewhere --> </form>
Then if your textbox input is named "search" by means of the id attribute then it should submit to the search page with the query in the query string.
Thanks for the info about your macro and search results you entered while I was typing!
XSLTsearch says you're only searching one page. Is that true? Do you have only one page in your site? If you have more, what's the basic structure of your content tree as that can be important.
Also, we can see that you do have XSLTsearch installed and running properly. It's just a matter of searching all the content you want I think.
Let us know what your site is like. We're close to solved already!
This what my content tree looks like:
Thanks for the form tags Grant :) I manage to see some changes:) I manage to search without using /search.aspx?search=test ?
Doug and Grant,
my problem now isw, it doesn;t show any result, even though I type something like "archive" on the search area
Another thing, how can I put a search box in my master page? should I use the form tags+xslt macro?
Thanks a bunch :)
Thanks for the info about the content tree... that's why you're not getting any results. You have two choices for how to resolve that.
1. Move the Search page to below the 'Personal Website' page. This is the recommended solution in most cases.Be sure to allow the XSLTsearch page below the Personal Site page by ticking it on the 'Structure' tab of the Personal Site's document type in the Settings section of Umbraco.
2. Edit XSLTsearch.xslt file to search absolutely all content.In the xslt file you'll need to put <!-- --> comments around the existing line and uncomment the line that is commented out by default. It's an easy change and there are comments to point the way. The result should look like this:
<xsl:when test="number($source)= -1 or number($source)= 0"> <!-- using ALL nodes --> <xsl:call-template name="search"> <!-- searches absolutely all pages (useful if you want to search multiple sites at once, or if you do not have all your content pages below a common homepage node in the content tree) --> <xsl:with-param name="items" select="umbraco.library:GetXmlAll()/*"/> <!-- searches all pages within a specific site (useful if you have multiple sites in one umbraco installation) --> <!-- <xsl:with-param name="items" select="$currentPage/ancestor-or-self::* [@level = '1']"/> --> </xsl:call-template></xsl:when>
Then, once you've got the search page working and searching all your content and finding results, you'll only need to use the following snippet in the master template to add a search box to the banner of your site. You don't need to use the XSLTsearch macro there, just a form with the proper name/id of the text field and an action= that will send the request to the main search page (which by now should be working).
Here's a forum thread that explains how to do this:http://our.umbraco.org/projects/website-utilities/xsltsearch/xsltsearch-bugs/12198-search-bar-on-the-master-page
Thanks Doug and Grant :)
my searchbox is now working.YEY!! All I have to do now is edit its css to make it look cool :P
Thanks a Bunch :)
Well done, Rea!
Indeed, well done. Have fun! (:
wow!!!, it worked for me too, :)
thanks Doug and Grant and Reah!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted