Most Popular
1500 questions
4
votes
1 answer
When developing plugins where should you store values that might not strictly be settings?
For instance I'm writing a plugin which is going to be periodically pulling stuff from Twitter, so I'd like to keep a hold of when the plugin was last run and maybe some Ids relevant to Twitter that sort of thing.
I know there is the settings array…
Steve Holland
- 2,485
- 1
- 16
- 31
4
votes
0 answers
Multiple Entry Types on GraphQL Fragment
So I am building out a Gatsby Site, which is using Craft in Headless mode as it's content source.
In one Section, I have three entry types. Currently they have identical fields, but may diverge in the future.
I currently have built out my template…
David Beesley
- 41
- 2
4
votes
1 answer
How do you set up live preview for headless Craft CMS installs connected to Gatsby?
How do you set up live preview for headless Craft CMS installs connected to Gatsby?
Anonymous
- 95
- 5
4
votes
0 answers
Testing / Fixtures: setup Entries in Structure
Background: I have experience with vanilla PHPUnit testing of projects, but this the first attempt at both testing a Craft project and using Codeception for testing.
Case: I have a section of type structure of maximum 2 levels deep. The URL I want…
qrazi
- 141
- 1
4
votes
1 answer
How do you page through entries in a structure?
I have a structure like below and need previous / next links on an entry such that they go back and forth between E, F, G and H. They shouldn't step into D or I.
I've been trying this, but I can't get it not to step into D or I.
{% set prev =…
user1070143
- 1,106
- 12
- 24
4
votes
1 answer
Prevent Redactor from stripping tags like
Is there any possible way to prevent tags from being stripped from a Redactor field? I've tried all I can using custom Redactor and HTMLPurifier configs to no avail.
Basically what I'm trying to do long-term is replace heading tags like
…
James Sudimak
- 51
- 1
4
votes
1 answer
Using multiple elementTypes in Element API
I am currently trying to create an autocomplete search with the element-api. I need results from two different elementTypes:
Product::class
Entry::class
How do I get results out of both elementTypes with only one endpoint?
Thats my working…
pepe
- 315
- 1
- 8
4
votes
1 answer
How to accept incoming webhooks?
I've tested the webhooks plugin. Awesome. Works brilliantly.
How how about incoming webhooks? What if my 3rd party ERP system has changes that it wants to put into my Craft site. How do I go about getting the changes into Craft?
nitech
- 679
- 3
- 15
4
votes
0 answers
User Event before Login - check if user has password and logged in before
Is there a User Event before the authentication is fired?
I want to show a message if the user doesn't have a password yet and if it's his first login / check if he never logged in before - All in the frontend.
If so, send the activation / set…
Christopher Dosin
- 528
- 2
- 7
4
votes
1 answer
Feed Me Import Categories from CSV
I am trying to import some categories from a CSV into Craft entries (a categories field). Everything else imports ok apart from the categories
I have created the categories in admin with the same name as the CSV categories but when I import nothing…
Malcolm Maclean
- 377
- 1
- 8
4
votes
1 answer
What is "Temp Uploads Location" in Craft 3.2.10
In Craft (Solo) 3.2.10, In Settings > Assets > Asset Settings, there's a field called "Temp Uploads Location". I do see images in mine that I intended to go into the system, but not into there.
What is that feature for?
BBaysinger
- 339
- 1
- 15
4
votes
2 answers
How to access HTML input values from Twig and vice versa
I am new to Craft and Twig in general. I have encountered the following problems and struggling to find a solution for hours.
I want to access the value of "foo" input field inside the twig delimiters to set the "json" variable.
I want to change…
ves
- 117
- 1
- 8
4
votes
1 answer
Serving CSS files from template folder
Is there a way to serve my CSS files from the templates folder? I am wanting to be able to use TWIG tags, etc to build some of this. And even if the TWIG tag idea does not work out, I would prefer this sort of an organizational structure.
Jeremiah
- 121
- 1
- 7
4
votes
1 answer
What are the different scenarios to plan for when using $allowAnonymous in a controller?
Craft 3.2 updates how the allowAnonymous behavior works. I have things working in our plugins but I don't understand the different syntaxes needed across our different allowAnonymous use cases.
For example, Sprout Forms fails to submit unless we…
Ben Parizek
- 13,448
- 1
- 33
- 98
4
votes
2 answers
Front end login form with ajax
Im trying to get a front end login form to work over ajax and running into issues, it seems to always pass back success and not sure how to actual make sure the cookie gets created and the user is logged in?
here is the gist of what i have right…
Keith Mancuso
- 2,421
- 16
- 27