jonassiewertsen / statamic-live-search Goto Github PK
View Code? Open in Web Editor NEWA Statamic Live Search realized with Laravel Livewire.
A Statamic Live Search realized with Laravel Livewire.
I have build the following
and now i want to be able to create it like:
I have it so that when it finds the post it returns the title, that works fine
<button type="button" class="search__btn"><i class="fas fa-search"></i></button>
<ul>
{{ results }}
<li>{{ title }}</li>
{{ /results }}
</ul>
But i dont understand how to get the other two options. i tried doing it like u normaly would in statamic but that did not work
<button type="button" class="search__btn"><i class="fas fa-search"></i></button>
<ul>
{{ results }}
{{ if no_results }}
<li>No results found for {{ get:q }}.</li>
{{ else }}
<li>{{ title }}</li>
{{ /if }}
{{ /results }}
</ul>
Hey, is it possible to add a pagination to the results?
Hi
Just wondering, is there any additional steps to ensure search continues to work after updating?
I was running Live Search 1.7.0
which installed Livewire 2.12.0
, the dropdown auto populated as I was typing.
Unfortunately, since updating to Live Search 2.0.1
and Livewire 3.2.0
the dropdown no longer works?
I've checked console
in dev tools, no errors. I've also checked for any message in laravel.log
it's empty?
I've rebuild the search index php artisan statamic:search:update --all
Is there anything else I can try?
Environment
Application Name:
Laravel Version: 10.48.4
PHP Version: 8.2.2
Composer Version: 2.6.5
Environment: local
Debug Mode: OFF
URL:
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: pusher
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: redis
Session: file
Livewire
Livewire: v3.4.9
Statamic
Addons: 6
Antlers: runtime
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.55.0 PRO
Statamic Addons
jacksleight/statamic-bard-mutator: 2.3.0
jonassiewertsen/statamic-jobs: 1.4.0
jonassiewertsen/statamic-live-search: 2.0.1
jonassiewertsen/statamic-livewire: 3.2.0
statamic/collaboration: 0.8.1
teamnovu/statamic-images-missing-alt: 1.0.2
I use Statamic 3.2.* with Live-search ^1.2. .
Live-Searching the defined indexes searchables works perfectly fine and is a blast.
Once l I introduce special german characters to the search query the results stop working.
I can type the query up until the special char and it works and then it breaks.
Charset and locales are set to 'de' / 'UTF-8' respectively in the statamic config/app.php / config/statamic/system.php.
Any direction on how to make this work in Blade?
Hi, thanks for your work on these repo's!
Is it possible to support jonassiewertsen/statamic-livewire
3.0 that you recently released?
Hi,
I'm trying to use my own template, but this results in an undefined constant error.
It is very strange since my file is located in the views > components > partials folder and i'm linking to it as described in the docs
What am i doing wrong?
Statamic/cms: 3.3.25
livewire/livewire: 2.10
laravel/framework: 9.0
The search results do only contain fields, which have been set to searchable.
The returned search result should contain all information.
This is the part we need to adjust:
https://github.com/jonassiewertsen/statamic-live-search/blob/main/src/Traits/SearchFacade.php#L30
Hi,
I was trying to upgrade to Statamic 4, but I got these problems regarding your package...
Problem 1 - Root composer.json requires statamic/cms 4.0, found statamic/cms[v4.0.0] but these were not loaded, likely because it conflicts with another require. Problem 2 - jonassiewertsen/statamic-live-search is locked to version v1.6.0 and an update of this package was not requested. - jonassiewertsen/statamic-live-search v1.6.0 requires statamic/cms 3.0.* || 3.1.* || 3.2.* || 3.3.* || 3.4.* -> found statamic/cms[v3.0.0-beta.1, ..., 3.4.x-dev] but it conflicts with your root composer.json require (4.0). Problem 3 - jonassiewertsen/statamic-livewire is locked to version v2.12.0 and an update of this package was not requested. - jonassiewertsen/statamic-livewire v2.12.0 requires statamic/cms 3.0.* || 3.1.* || 3.2.* || 3.3.* || 3.4.* || ^4.0 -> found statamic/cms[v3.0.0-beta.1, ..., 3.4.x-dev, v4.0.0-alpha.1, ..., 4.x-dev] but these were not loaded, likely because it conflicts with another require.
Do you have an idea to resolve it?
Hi!
The problem: results from both sites for specific collection are returned.
What did I configure:
I configured search.php to search in specific fields within a specific collection.
The question:
From what i can understand in the docs is that Statamic does look at the current site. But why are my results not being filtered to show only results from the current site? Do I need a specific controller to alter the default logic?
Hey Jonas,
I seem to be running into issues when upgrading from v1.7 to v2.
The livewire component isn't working.
I recorded a 1 min video showing this failing here. I'm missing something, or maybe something broke in v2 / livewire 3.
Thanks for your work on the addon; it's very handy :)
Here are my details in case they help:
Environment
Application Name: Statamic
Laravel Version: 10.43.0
PHP Version: 8.2.15
Composer Version: 2.5.5
Environment: local
Debug Mode: ENABLED
URL: comtrade.test
Maintenance Mode: OFF
Cache
Config: CACHED
Events: NOT CACHED
Routes: CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: daily
Mail: smtp
Queue: sync
Session: file
Statamic
Addons: 6
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.47.0 PRO
Statamic Addons
aryehraber/statamic-captcha: 1.10.0
jonassiewertsen/statamic-live-search: 1.7.0
jonassiewertsen/statamic-livewire: 2.12.0
statamic/collaboration: 0.8.1
statamic/seo-pro: 5.4.1
Hi
I'm using Live Search and was wondering if it's compatible with Livewire 3.0?
Hey, how do you add the reset button for the search?
In your default template it's not included i think.
Right know the user have to delete the search term in the input.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.