Problems with searchbox

Hi,


I recently tried putting in a searchbox to a site design and have had problems printing it onto the design. I've copied the code on page 68 of the manual for dynamic search and dragged out the css styles from the appendix. Ive changed the label line so it links to the search field on the search page.



If i put a check message in the search-form div it displays fine and is right justifited but the search form itself doesnt print at all.



Any ideas/help would be greatly appreciated.



Liam



ps. I accidently posted this in the designs forum feel free to delete that thread

We ended up solving this through a support request. It turns out Liam was unaware of the need to use design customisations to make reference to a search page – that is, a page that has a Design asset (not a Design Customisation) won't show stuff like this.


A design customisation allows you to tell Matrix about assets that you want refer to within your design. In the case of a search box, you need to choose a search page asset and a field from that search page before your search box will be displayed.

How do i use design customisations to make reference to a search page?


When you create a Design Customisation to configure the Searchbox, you need to apply the Design Customisation as the System Frontend Design to your Site. Not the parent Design asset. Therefore, you need to create a Customisation that has customised versions of all the design areas you want to customise. Then apply that to your Site. If you want different parts of your site to have different design options, you would create multiple customisations.

Also, you can customise a custmisation, you can create a generic customisation that has all the global configuration options (searchbox, css) and section-specific child customisations that can change images or nested content.

I created the customisation to configure the Searchbox. Checked the Customise box for search_box and clicked commit.
I then applied the searchbox customisation to the System Frontend Design to the site.



Reloaded the site, and the searchbox ain't appearing. There must be something im missing.


Yes -- you need to configure the customised design area. Once you customised the searchbox design area, it'll appear on the Details screen of the Customisation as a link. If you click the link, you'll go to the details screen of the design area itself. On this screen, you will be able to configure the search page the search box is linked to and the search field it will use.

A tip: The first thing you should configure is the search page. Once you do that, re-acquire the lock and Matrix will show you all the fields that are available on that search page.

So close!


I've got it appearing on the webpage. But i don't have the input box showing where i can type in text. Is that a configuration on the Search Page, or I set it up in CSS?


The searchbox design area paints an input field linked to the search field on the search page. If you're not seeing an input box, check that you've selected a search field for the searchbox design area.

I have got it appearing on the website, thankyou.


Now to get the results to show, do I set up a metadata schema?


No, you just configure the Search Page itself. :)

The "Initial Page Layout" defines what appears on the search page itself, before a search is performed, i.e. the search form.
The "Results Page Layout" defines what the overall results page will contain. This is the layout that will fire when the searchbox triggered search finds results.
The "No Results Page Layout" is displayed if a search doesn't find any results.

For the last two layouts, the Type Format bodycopies control how each result will appear. You can use the Default Format for all asset types, or define a unique format per asset type by configured Custom Format bodycopies on the "Display Formats" screen. If you don't customise a Type Format, Matrix will paint the default format for that asset type.

Not sure if I configured the Search Page correctly, i'm just testing a simple search of one of the standard pages, yet it still comes up with the No Result screen. :huh:


There are lots of reasons for this -- you need to make sure you've selected the correct statuses, for example. Also, you need to make sure your search field is correct. Do you have the Search Manual?

Im just looking through the search manual. I was on the phone to one of the support guys and he said I only had to configure the 'Search Page Chapter 3' of the manual to get the search to work. Is that correct?


This is correct. And make sure indexing is turned on in the Search Manager!

Im still having problems. <_<


I've attached some images and was wondering if someone could have a look and see what is wrong.



Basically when i search for 'Home' which is one of the main pages, I still get a No Results Found.

Also note my Indexing is turned 'on'.



Search Details Screen (1):







Search Details Screen (2):







Search Details Screen (3):







Search Fields Screen:







Search Catagories Screen:







Display Formats Screen:



A major problem I see right off is that you did not set a root node. Right now, since you did not set one, it is only searching for assets UNDER that search page, so there might be nothing there. You need to set that root node to your site, so that it can search the entire thing. Also, do you have anything selected for Search Statuses? I would set that to live.


Hope that helps.

I've set the Site as the Root Node, and the search status was on live and still is.


It still comes up with no results… :huh:

[quote]I've set the Site as the Root Node, and the search status was on live and still is.


It still comes up with no results… :huh:[/quote]



I would be happy to look at your site for a few minutes if you give me a restricted user/pass. Might be easier. If not, not worries.


I will pm you the details, tell me if you can or cannot access it.

Ok new update.


When i search from the home page, i get the No Results page found. On the No Results Page layout I have the %name_query% and %submit_button%.

I enter the query again and click on submit button and the search works. It comes up with the result.



How come the results don't show up after I search from the homepage, but does when I search from the No Results Page Layout?