mmx / search
Convenient search for MODX
1.3.1
2024-09-03 15:38 UTC
Requires
- php: >=8.1
- mmx/database: ^1.3
- vesp/core: ^4.0
README
This extra is part of MMX initiative - the Modern MODX approach.
Dependencies
This package requires mmxDatabase to work with MODX database using Eloquent models.
The mmx/database
dependency will be downloaded automatically by Composer.
Prepare
This package can be installed only with Composer.
If you are still not using Composer with MODX 3, just download the composer.json
of your version:
cd /to/modx/root/
wget https://raw.githubusercontent.com/modxcms/revolution/v3.0.5-pl/composer.json
Install
composer require mmx/search --update-no-dev
composer exec mmx-search install
Update
composer update mmx/search --no-dev
composer exec mmx-search install
Remove
composer exec mmx-search remove
composer remove mmx/search
If you don't want to use mmxDatabase, you can also remove it.
composer exec mmx-database remove && composer remove mmx/database
How to use
- Open mmxSearch extra section in manager.
- Create new search index with unique
title
, for exampleTest
. - Index resource with
refresh
button. - Call
mmxSearch
snippet with specifying the title of index:
[[!mmxSearch?index=`test`]]
You can specify tplBtn
parameter with chunk for search button.
Another parameter noCSS
will disable loading of built styles.