0
votes
1answer
7 views

Question about “relatedTo”

I want to get list of entries in my section video related to my current entry {% for video in craft.entries.section('videos').limit('3').relatedTo({targetElement: entry.title, field: 'talents'}) %} ...
1
vote
1answer
6 views

Error declaring TLS Version wrong in Charge plugin

I am getting an error notice in the Squarebit Charge plugin saying This server doesn't support TLS 1.2. but when I check with the hosting provider (Arcustech, the best!) they assure me that the server ...
1
vote
1answer
16 views

Pagination and Entry Model on Homepage

On my site I have some entries with images. In the entry template I paginate the images like so: {% paginate entry.images.limit(1) as images %} My homepage is a single random entry and I want to ...
2
votes
2answers
31 views

Search with string, entry type and category

So I have been asked to build a resource center just like hubspot's. (insert rolleyes here) https://www.hubspot.com/resources You can click into a type, and then click at topic and it creates a url ...
1
vote
1answer
12 views

query on Super Table field's date field

I have a section (events) with a Super Table field that has a date field. I am looking for a way to make a request to have the events superior to now. I cannot find how to do it. The event have ...
0
votes
0answers
18 views

How to output <link rel=“alternate”> for each language?

I can't work out how to output <link rel="alternate"> for each language variation? Is there any easy way to do this please? Many thanks!
1
vote
1answer
29 views

Problem pulling Tweets with media using Dukt's Twitter API plugin

{% set tweets = craft.twitter.get('statuses/user_timeline', { tweet_mode:'extended' }) %} {% for tweet in tweets %} <li> {% if tweet.extended_entities.media is defined %} {% ...
0
votes
0answers
10 views

Isolating Category Groups in a Multi-Site Environment

I'm working on a multi-site project that will be a network of blogs. Each of the blogs use the same templates and the only thing that's different is the content. All of the entries are all taken care ...
1
vote
1answer
23 views

Ajax Load more Posts

On my blog i need a load more button on the bottom of each section that simply loads more posts when clicked. Everything i look at people are using other javascript libraries. I just want to use ajax ...
1
vote
1answer
13 views

“Unknown ”craft“ function” Error in Plugin Service Call

I'm just starting with plugins and I've downloaded the Business Logic plugin and am trying to call it from my template. Here's the code in my template: {% extends "_layout" %} {% block content %} ...
1
vote
1answer
18 views

Showing entries for light switch

So I have three light switches on my blog: 'featured', 'required reading' and 'skills'. I got the featured section to work with this code: {% for entry in craft.entries .section(['etiquette', '...
1
vote
1answer
13 views

Craft Commerce 2 - get order data for plugin

I want to write a plugin which writes all the order data into a CSV file. Unfortunately the documentation for Commerce 2 isn't quite complete yet so I have difficulties to find out how to do the ...
1
vote
2answers
23 views

Plugin I created is asking for a license key

I created a plugin for a client website and I keep getting license issues popping up in the admin panel for it. Not sure what I am doing wrong here. Obviously I have no intention of putting it into ...
0
votes
0answers
11 views

Dukt Social plugin issue - cannot configure any authentication

I have emailed Dukt directly but thought someone here may be able to help. I have purchased dukt/social and installed on Craft3 Pro. We have Google accounts at our organisation and I'm looking to ...
0
votes
0answers
14 views

Plugin stops working when logged out

I have a plugin that sets the user group based on whether a hidden checkbox has been ticked on the sign up form. The plugin works exactly as I want it to while I'm logged in, but as soon as I log out ...
2
votes
1answer
22 views

How to display entries filtered from more than one category

I want to try to learn how I can filter entries by multiple categories. I realise similar questions have been asked in the past, but all the answers are for specific use cases. All I want to do is ...
1
vote
0answers
7 views

Plugin, getting an entry when one of multiple category fields and/or lightswitches are not empty/turned on

Basically I’m trying to get en Entry where, either one (or more) of three lightswitches is (are) turned on, or where either categoryOne or categoryTwo is not empty. This is what I got so far, but it ...
1
vote
1answer
13 views

How can I call console controllers

I have a controller in the console folder. How can I call this controller via ajax please? I tried to config a route in Routes.php, and then call this route by jquery Get() function. But none of ...
2
votes
1answer
22 views

Nesting block tags doesnt work

I have pagination twig component that needs to inject seo links into of page (rel canonical). I tried to use {% block %} twig tag for this, but problem is that pagination component is already ...
0
votes
0answers
12 views

Ajax search depending on user

So i need to implement ajax with my search, basically auto populating as you type. I need it to auto populate entries, channels and structures. However i need to ONLY show certain results if the user ...
1
vote
1answer
15 views

How do you reset a cart under Craft Commerce 2?

How do you reset or empty the cart, in Commerce 2? There is no mention of this in the documentation. In Commerce 1, it was possible to issue a request to the commerce/cart/removeAllLineItems action ...
1
vote
1answer
13 views

Where to put where() for a query looking for a lightswitch field

Struggling with syntax here. I'm trying to query entries in the "resources" section, ordered by postDate desc, limit 1 and that also has the lightswitch "featured" as true. Here is what I have. ...
1
vote
1answer
12 views

How can I get the type of a field using Twig?

I would like to loop through all the fields of a field layout tab form the current entry. This is working fine to get the field name and value: {% for fieldLayoutField in entry.getFieldLayout()....
1
vote
1answer
15 views

How to create a border + border colour field on an image

My first question here... maybe one of a few! I've inherited a Craft project recently and don't have much experience with it. I want to allow admin to set a border (and border color) whenever they ...
1
vote
1answer
20 views

404 page title SEOmatic

404 page doesn't have a title. It shows "| Sitename" in my case. I'm using Craft 3 with the SEOmatic plugin and would like to set the title in the 404 template. {% set seomaticMeta = seomaticMeta | ...
1
vote
1answer
20 views

Upgraded to Craft 3 and lost my Commerce Gateways

I upgraded to Craft 3 and I went to my payment gateways and I have the old ones in there with no details such as keys. And my only gateway options are Dummy and Manual. I know there were changes such ...
0
votes
0answers
11 views

Importing data through feed-me plugin, crashing

Using Craft 2. Trying to import data through XML but on the first stage, after hitting save and continue, it crashes/infinitely loads. The PHP server also crashes/freezes with no error messages. Have ...
1
vote
2answers
11 views

Find entries that use a specific block in their Matrix field?

Suppose a Mtrix field named MyMatrixField has three blocks called Text, Images, and Buttons. What MySQL query would list the section and title for all entries whose MyMatrixField field has a Buttons ...
1
vote
0answers
21 views

Showing entries in CP only for specific category

I need to sort structure section entries belonging to specific category (entries have category field). With default structure list displayed in CP, i see all entries for this structure type section ...
1
vote
1answer
30 views

How to speed up a single entry page with Eager Loading

This is a single entry page. I have an assets field of imageGallery which allows multiple images to be uploaded but it could also be empty. I want to use the first image at the top of the page (if one ...
1
vote
0answers
7 views

Solspace Freeform plugin: Multi page form not going to next page

I have a multi-page form set up. No matter what I enter on page 1, the form doesn't submit - the page just reloads. Looking in devtools - the POST data is there, but seems like Freeform is not ...
-1
votes
0answers
12 views

Submit result from the front to the backoffice Craft CMS 2

I v'e got a new project coming soon, and I want to do it with Craft CMS 2, but I am wondering if there is a possible way to submit some result from the front end to the Cpannel entries, even have a ...
1
vote
1answer
23 views

Entry URI format with postDate not working

I have a News channel that's looped on an 'News Index' template. Each news entry is linked to its respective link via {{ entry.url }}. In my News channel settings, I have the entry URI format to be ...
0
votes
0answers
19 views

Custom Email Templates

I need to create a couple of custom HTML Email templates for some of my forms. Most of the documentation i've found doesn't really help me figure out what i need to do. Has anyone done more than 3 ...
1
vote
1answer
18 views

How do multiple date queries differ between Craft 2 and 3

After spending a lot of time solving this for myself I thought I'd share it. In my Craft 2 template I had this query: {% set result = craft.entries({ section: 'events', eventDate: ['and', '&...
1
vote
2answers
54 views

Where should the .all() be placed in Craft 3

I'm confused, I have ended up with 2 similar queries in a template after converting them from Craft 2. {% set events = craft.entries() .section('events') .eventDate('>' ~ now|date('Y-m-d H:...
1
vote
1answer
11 views

Batch entries by year?

I have a press release index page that loops through all the press releases. I want to organize them by year. So everything in 2018 will have a header that says 2018 press releases and then all the ...
0
votes
1answer
31 views

How do I restore a site from backup

I broke permissions in a critical craft install. My solution was to install a new version of the craft, move all of the templates from the old site to the new site and restore the MySQL database. ...
1
vote
2answers
120 views

How do I use offset in Craft 3?

In Craft 2 I used: {% for image in entry.imageGallery.offset(1) %} to exclude the first image, as that is shown higher up in the template. I get the depreciation error of: Looping through element ...
1
vote
1answer
18 views

Translating Craft form error message labels

I am trying to change the label for Craft's form errors. My site local is currently fr_CA, and when I try to submit a form with an error, the error message returned is in french, but the label of the ...
1
vote
0answers
13 views

Complex shipping logics

In Craft Commerce 2, we have two shipping categories: PostNL, which is one of the Dutch main shipping methods, which we use for packages that fit in the mailbox. For this category we use the weight ...
1
vote
0answers
27 views

Craft 3 Custom Plugin: model validation

Struggling a bit here - have created a custom plugin where I want to validate form submission against a predefined model before saving to the database. All pretty straightforward so far … However, if ...
1
vote
1answer
24 views

How do I differentiate between entries after merging an array?

I'm trying to plot entries from two different Solspace Calendars and an Entries section on one map, and use different markers for all types. Alll of the events are related to the current Entry through ...
1
vote
1answer
20 views

How to get the previous or next two entries

I have an entry which needs to display the previous two entries, and the next two. I see in the docs there's a nextSiblingOf method. That does nothing in a channel, and in a structure it will only ...
1
vote
0answers
10 views

Commerce: reading Stripe object in Craft Transaction model

I'm looking to add the credit card last four digits to my customer's frontend order history. Stripe is the gateway. The Stripe transaction object doesn't seem to be available in the Craft ...
1
vote
1answer
29 views

Guest Entries - How I can send message to user after saving form information

I use Guest Entries plugin to add information, and I need to send some message to user who filled the form to email. Can you show me an example of how I can do this?
1
vote
1answer
11 views

Get the location and id of asset volumne

Is it possible to get the location (/media) and id (1) of an asset volume from within a Craft template?
0
votes
1answer
14 views

Removing “action” from a module's route. Is it possible?

I have a module with a route that looks like this: http://localhost/actions/module/controller/action Is it possible to set up a custom route within my module so I can send people to: http://...
0
votes
0answers
6 views

Craft Commerce Discounts - Promo code for one free item if there are five items in cart

Our site will offer only one product. Can we create a promo code that will apply 100% discount on 1 product if there are at least 5 products in the cart? I was playing with the conditions and had: ...
0
votes
0answers
11 views

How to import related entries with Feed Me?

I'm struggling to import entries with related entry information into a blank database. My exported JSON file has a field that holds data of related entries: [article_related_articles_relate] => ...

15 30 50 per page