Questions tagged [craftcms]

Craft CMS is a web content management system written in PHP and built on the Yii PHP framework.

Craft CMS

Craft CMS is a web content management system written in PHP and built on the Yii PHP framework. It is extendable with plugins.

Resources

243 questions
2
votes
1 answer

How can I get the parent page title in craft using twig?

Example I have a structure For all the subpages / child pages in the structure. I want to access the title of its parent. The result being that all the level 1 headers have the parent page title displayed as the header All the children pages have…
DumbDevGirl42069
  • 891
  • 5
  • 18
  • 47
2
votes
2 answers

How can I display the image from the related entry for each entry in craft CMS and twig?

I have a a list of entries. Each entry has a related person. Each related person has an avatar. On my index page I am looping over the entries and creating a
with the persons details. Eg {% set person = entry.relatedPerson[0] ?? null…
DumbDevGirl42069
  • 891
  • 5
  • 18
  • 47
2
votes
1 answer

How to "connect" Laravel project with Craft 3 CMS Website

I've developed an app which fetches data from an API based on Laravel 5.5. The marketing landingpage of the app is based on Craft CMS Version 3. The marketing website and the API and the databases of both systems are running on the same server. I…
rakete
  • 2,953
  • 11
  • 54
  • 108
2
votes
0 answers

Add twig function to Craft CMS

How can I add a custom twig function to Craft CMS version 3? Twig outlines how to add a function but not sure how to apply to Craft. https://twig.symfony.com/doc/2.x/advanced.html#functions $twig = new Twig_Environment($loader); $function = new…
Tim Arney
  • 1,776
  • 2
  • 18
  • 23
2
votes
1 answer

Craft CMS contact form with a sign up to MailChimp mailing list checkbox

I'm trying to create a contact form within Craft CMS v2 that includes a subscribe button which will add the user's details to a MailChimp mail list. I'm currently trying to use this MailChimp Plugin and this Contact Form Plugin, though merging two…
2
votes
1 answer

Craft CMS pull-in/nest field into a matrix

I'm loving Craft CMS and how flexible everything is. I'm wondering if the following situation is possible... When creating a matrix field, after adding a Block Type, rather than filling out each field manually, I would like to pull in another field…
Sheixt
  • 2,546
  • 12
  • 36
  • 65
1
vote
0 answers

I want to use query by calling globalset in CraftCMS all child fields should be return

I want to use query by calling globalset in CraftCMS all child fields should be return, because the query that were used in prod are diffrent than queries we use in normal graphql explorer, after some research i was able to get the issue that adding…
Farman
  • 11
  • 1
1
vote
0 answers

How to add a custom language in Craft 4

Context I am now working on a trilingual website in Craft CMS. It needs to be available in french, english and inuktikut (a native american language). Obviously french and english is easy as 123 but inuktikut is not natively supported in Craft 4 and…
1
vote
1 answer

'Request missing required body param' when submitting front end entry form - Craft CMS

I'm pretty new to craft and creating my first front end entry form using the demo code provided by craft. For some reason I'm getting a 'Request missing required body param' error. I've tried adding but…
George Bleasdale
  • 343
  • 7
  • 16
1
vote
1 answer

Jquery on click works on one page doesn't work on another

dropdown click working on one page but not on another even though its the same component that these page load and same javaScript file Here's the component
1
vote
0 answers

Why twig code in craftcms can't generate new code on localhost?

In craftCMS I've created a field to load content but this field is not showing up when i change my code in the template. I've checked if I used the correct folder At first i thought it was the cache but when i go to utilities to clear the cache the…
Travis Do
  • 11
  • 3
1
vote
1 answer

Order mySQL query (yii db query) based on array values

I'm currently working on a Craft Commerce site with a custom plugin (and custom table) and trying to order the db query results based on a 'code' value from an array (the array data is not available in the database since this is coming from an…
chlsydkysr
  • 23
  • 5
1
vote
0 answers

How to accès HTML data-attribute with Twig?

Not sure if this is possible, but I've a link with data-attributes 'data-form-recipient' set by Json objects :
1
vote
0 answers

How to create a CraftCMS frontend form with a matrix table utilising table and dropdown fields

I am attempting to create a front-end form utilising Craft CMS matrix fields and the dropdown/table field options. I have a matrix field called 'course', this has a Block Type called 'course' and this has two fields, 1. 'courseTitle', this is a…
1
vote
1 answer

Language Injection Rule PhpStorm -> JavaScript in Twig Block

I'm working with CraftCMS, which uses Twig. One of the methods I use to add JS is e.g. {% js at endBody %} console.log('I am JavaScript'); {% endjs %} I want to have it permanently highlighted as JavaScript, and not have to reinject it every…
D3strukt0r
  • 571
  • 1
  • 4
  • 19
1
2
3
16 17