have managed to install ModX OK, and download and install the stargazer template.
However, the search box now appears as [[ajaxsearch]]
I checked the installation instructions and don’t think I missed anything - any ideas as to where/how/why and what to do to fix??
Thanks
Daz
formerly sumodaz on here!
I FIXED IT!!
Despite looking at the code in the default modx template, I missed the fact that ’ajax’ should be spelt with a capital ’A’!
Changed that and the search box now appears!!
formerly sumodaz on here!
-
☆ A M B ☆
- 24,524 Posts
the snippet call has to match the snippet name exactly. You’ll also most likely want to call that snippet uncached [!ajaxSearch!]
OK, the snippet name bit makes sense - but the code in the template was cut/pasted from the file I downloaded.
I’ve now made the connection between the template code and snippets!! First modx lesson learnt....
formerly sumodaz on here!
And now I understand the [!snippet!]
Thanks Susan!
formerly sumodaz on here!
-
☆ A M B ☆
- 24,524 Posts
Interactive snippets (forms) need to either be themselves uncached, or be on uncached pages. If they get cached on cached pages, then the snippet’s initial output (the form) gets cached, and since the cached page no longer has the snippet tags, on form submission and page refresh, there’s no snippet to process the POST, so all you would get would be the form again.