Questions tagged [craft3]
For use with questions relating to the Craft 3 version of Craft CMS, including the Beta and RC releases.
How to grab all images from and section
I am sure this must be answered somewhere and I cannot find it. I need to grab all images from a section (channel) and display them in a slide show on the index page (index page is a single,so index ...
Craft 3 - Twig search query for entry with custom EntriesField containing disabled entry
I have a search form with 1 simple input (q) I also have 2 sections: SECTION-A & SECTION-B The search is for entries within SECTION A. The entry I'm searching for contains a custom entriesField ...
How to make the directory filter work according to the OR principle?
I have a problem with filtering elements. I have a product catalog and have an item filter. The filter has a set of checkboxes. The number of products corresponding to the property is indicated in ...
Generating srcset in a similar way to WordPress
I come from a WordPress background, so I'm attempting to create responsive images the way I'm accustomed to with WordPress. Perhaps that's the wrong approach, I'm not sure. In WordPress I would ...
How to use categories with Sprig's "Load More" recipe
I am trying out Sprig's "Load More" Recipe and I am trying to call up entries that are related to the current category page. But when I add .relatedTo(category) to the entry model, it doesn'...
Plugin settings per site/locale
I'm trying to make a plugin in Craft 3 but want it to be possible to set different settings for each separate site or locale. How would I go about doing this?
Guzzle fatal error using Craft Guzzle client
Using the code below to get 3rd party API $uri = $baseUri . '/area/' . $areaId . '.geojson?api_key=' . $mapAPIkey; $client = Craft::createGuzzleClient(); $response= $client->request('...
How to override homepage content through plugin?
Want to override index.twig content through a custom plugin. I want to create a plugin that appends some content on website homepage. How to Achieve this any reference will be helpful
Craft 3 admin panel only accessible when web/cpresources is exectuable for everyone
I’m trying to move a local Craft 3 site to a local server (hosted on 1&1). The website itself runs fine, but for some reason I can only access the admin panel when the web/cpresources folder has ...
Writing and debugging Craft plugins
I think my question is simple but may fall outside of the scope of this forum. What is best practices when writing and debugging Craft plugins? Obviously, one way to do so is to create a account on a ...
Elements::EVENT_AFTER_SAVE_ELEMENT - Event handler (in module) being called multiple times on creating a single element
Newbie to Craft CMS. I'm trying to send a push notification to an Android device from a Craft CMS module when an Entry of a particular type (NewsItem) is created / published. Here is the relevant code ...