-
- 372 Posts
I’m having trouble with this on 0.9.5 Beta 2
I do not get live search, and I don’t get highlighting. The JS is being loaded as the animations show while it is searching etc.
I have followed the instructions at MuddyDogPaws
except for step number 4 under How-to use the search highlight plugin
where it says the following
# Somewhere in your template or document add the html: :This will display the terms and a link to remove the highlighting.
What exactly was that meant to say between the : :ANSWER: <!--search_terms-->
I don’t think that’s the problem though as I notice the URL’s on the search return page don’t show
&highlight=AS_ajax_highlight+AS_ajax_highlight1. The plugin is present and set OnWebPagePrerender (installed & set with Beta2)
No idea about live search, the call is
[!AjaxSearch? $ajaxSearch=`1` &ajaxSearchType=`1` &ajaxMax=`10` &extract=`1`!]
-
- 228 Posts
Was going round and round... and round and round...
the AjaxSearch.js file was not loading, and even when loading it explicitly in the head with a full URL, wasn’t happening.
I set the page to be non-cacheable and was calling the snippet as non also.
After trying a ton of stuff, just thought I’d try calling the snippet [[AjaxSearch]].
The .js is now loading and appears to be working.
I’m still getting a feel for everything, so not sure if this is a fix, whether it is correct, but it also dawned on me that I think I remember using another snippet that had the same issue, needing to be called as non-cacheable, but if the page itself was set as non-cacheable, then it only seemed to work if the snippet wasn’t called that way.
Is this proper behavior or an issue? Is this a hard rule, or depends on the snippet in question? Just trying to understand... cheers
extra credit.... I do seem to be getting the EXCEPTION AJAX: Object required! alert in IE though... any ideas what, why, how to fix?
|
Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity. |
-
- 228 Posts
Can multiple searches appear on a page without interfering with the other or requiring duplicating the snippet with a different name?
I would like to have a small search form under the header in the navigation that shows up on all pages (in the template), that leads to a search page that includes a search form.
I would also like a search form on the 404 page that presents results there, and more results leads to the search page as well.
I can’t seem to get the nav bar search to work... finally got it to not show results in the search form, and to go to the search page, and it shows the results in the search area below the search form on that page... but as soon as I click in that main search form, the cursor pops up imediately into the nav bar search.
At first, it was giving AJAX errors, but now it seems to work, but having the cursor jump from one box to the other just won’t cut it, especially if the user doesn’t realize that’s what happened.
And can anyone clarify whether the attributes are to be written as:
AS_showForm=0
or
&AS_showForm=`0`
The tpl file has them written out the first way.
thanks
EDIT - okay, not an ideal solution, but I removed the search input above the content area, forcing the user to go back up to the nav bar to adjust their search.
Note: the tpl document needs to be cleaned up... &AS_ShowForm appears to be incorrect, and needs to be &AS_showForm... it is listed both ways in different places.
SideNote: don’t know if any standards are being created for naming conventions, but with case sensitivity and numerous people creating snippets, modules, plugins, etc., it would be good to establish a naming convention ASAP, including tags, directories, files, etc.
|
Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity. |
-
- 786 Posts
identity,
Sounds like you got everything working, so thats good. I have been meaing to do some updates to this snippet but have not had time to get to it, although, I do have a slightly updated version to be included in the next release of Modx, so I will get that added to the repository.
At this point the snippet can only be used once on a page due to the id used in the forms for the ajax functionality.
-
- 228 Posts
well... I’m not sure if I do or not... just that it seems to be working... not sure those are the same things.
Sorry if frustration was starting to ring out there, but I spent half a day working on this, which isn’t necessarily bad because I’m still figuring out MODx anyway (still under a week of use now) and this was the first time working with this Snippet... but it gets frustrating when things don’t work and you find out that you are calling things incorrectly due to mis-prints.
Is it okay then that it gets called in the nav bar and called again in the main content area, though the showForm is hidden there? Otherwise, how else do I cause the results to appear there. The way I was understanding the docs was it may be necessary to call it one place and then call it again to display results in a different location.
Can you clarify the &AS_showForm and similar coding, whether it is to be written with the ’&’ or not, `0` backticks or not? Again, this seems to be written both ways in various places.
What about calling it [!AjaxSearch!] versus [[AjaxSearch]] depending on whether the page is set to no cache or not? I wouldn’t have thought calling it non-cached on a non-cached page would matter, but seems to be the case.
thanks
|
Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity. |
-
- 786 Posts
muskokee,
you will just need to play around with some css to get it positioned where you want it. I don’t have the code in front of me right now, but I think the image just gets added to the form, so check your styles on the form to make sure there is room for it to be added after the submit button.