needletail / needletail-craft3
Needletail Search and Index package for Craft CMS
Installs: 3 733
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:craft-plugin
Requires
- craftcms/cms: ^5.0.0
- needletail/needletail-php: ^3.0
- dev-main
- v5.0.6
- v5.0.5
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0
- v4.3.2
- v4.3.1
- v4.3.0
- v4.2.3
- v4.2.2
- v4.2.1
- v4.2.0
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.3.0
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.22
- 3.0.21
- 3.0.20
- 3.0.19
- 3.0.18
- 3.0.17
- 3.0.16
- 3.0.15
- 3.0.14
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.1
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.0
- dev-dependabot/composer/craftcms/cms-5.5.5
- dev-craft5
- dev-craft4
- dev-craft3
- dev-releases/v4.3.0
- dev-releases/v5.0.0
- dev-develop
This package is auto-updated.
Last update: 2025-01-21 19:49:49 UTC
README
Needletail Search and Index package for Craft 3.x
Requirements
This plugin requires Craft CMS 3 or 4
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require needletail/needletail-craft
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Needletail.
Brought to you by Needletail
Custom Twig file
You can create a custom twig file to render the results. To do this, create a new file in your templates folder called _needletail/[[BUCKET_NAME]].twig
. This file will be used to render the search results. You can use the following variables in this file:
entry
- The record that will be rendered
Example:
{ "title": "{{ entry.title }}", "slug": "{{ entry.slug }}", "url": "{{ entry.getUrl() }}", "date": "{{ entry.postDate|date('Y-m-d') }}", "author": "{{ entry.author }}" }
Testing:
For easy testing you can create a new twig file in your templates folder [[BUCKET_NAME]].json.twig
and add the following code:
{% set entry = craft.entries({id: [[ENTRY_ID]]}).one() %} {% include "_needletail/[[BUCKET_NAME]].twig" %}
You can then call $PRIMARY_SITE_URL/[[BUCKET_NAME]].json
in your browser to see the rendered result.
Note! Make sure to replace
[[BUCKET_NAME]]
and[[ENTRY_ID]]
with the correct values.