我如何在 Modx 中创建一个搜索功能,该功能将根据用户从某些预定搜索条件中选择的内容来限制返回的结果。如:“颜色”、“尺寸”、“型号”。
因此,选择“Blue”、“Large”、“AZ84”的用户将看到型号为 AZ84 且大而蓝色的项目列表。
谢谢你的帮助!
Assuming you're talking ModX Evolution - you can do it with Ditto. See 'request extender' : http://ditto.modxcms.com/extenders/request.html
You can also wrap it with your own snippet to get the get/post, validate it and build the results via a runSnippet call to Ditto.
if you need more specific stuff (like date ranges, etc..) you can do it with simple extenders for custom filtering and sorting. (look in /assets/snippets/ditto/extenders/example.extender.inc.php)