Hot answers tagged

2

First I think it helps to clear up some terminology... I've seen a few devs (myself included sometimes!) using the word "hooks" when they really mean "events". For me at least this is a hangover from Craft 2 (and also ExpressionEngine), where "hooks" were used to inject custom back end code. In Craft 3 however, everything is ...


2

Try this: {{ sprig('_layouts/_categories/_loadMore', {limit: 6, category: category}) }} {{ sprig.script }} After query category is not defined.


1

You're not gonna like this answer, but... rename your plugin. There's no way to reasonably circumvent all of the conflicts you're going to run into by keeping the same name as an existing public plugin. If it's a private plugin that you're only using on a single site, consider converting it into a module instead.


1

From your code sample it looks like you may be using Blitz to cache the page, in which case this is likely neither a Sprig issue nor a Snaptcha issue. A CSRF token is a dynamic token which should not be statically cached. You would normally use the {{ craft.blitz.csrfInput() }} tag but since you are using Sprig, I'd recommend you look into implementing the ...


Only top voted, non community-wiki answers of a minimum length are eligible