Newest Questions
14,621 questions
0
votes
1
answer
14
views
Modify date with a variable
Bit rusty on Craft but trying to modify the time using a variable.
{ item.time|date_modify(' 45 min')|time('short') }}
This works but I need to be able to replace 45 with {{ item.length }}
0
votes
1
answer
33
views
Excluding entries with a certain category from a query
I'm trying to build a search page on a Craft 3.x site that returns results based on values in the query string. That part I've got working OK with the code below:
{% if craft.app.request....
0
votes
0
answers
19
views
MatrixBlock::$deletedWithOwner must be ?bool
I'm currently upgrading a Craft CMS project from version 4 to 5. The update works perfectly on my local environment, but when building on the staging server, I run into this error after running:
php8....
0
votes
1
answer
27
views
Preview in a Craft 5 multisite setup
I am developing a multisite project in Craft 5. There are three different sites, each with their own unique domain. Each site uses the same templates, but each has its own unique content, e.g. they ...
0
votes
0
answers
21
views
Mail configuration when using Office365
I've just migrated a site for a client into Azure infrastructure. They want mail to be sent over their kit and not an outside service. But they are using Office 365 and the only Mail Server they can ...
0
votes
2
answers
29
views
How to render js with the proper namespace using asCpScreen()->contentHtml()
I have a slideout that tries to render an EditableTable field. Everything almost works but the slideout namespaces the HTML with a random prefix and does not do the same to the JS so the JS doesn't ...
0
votes
0
answers
10
views
Edit an order and send a link to allow customer to balance owing
I have a client I have set up in Craft Commerce who regularly needs to be able to modify an existing order and add additional items, which changes the order to 'partial paid' - this is good.
But then ...
0
votes
1
answer
29
views
What would be the best approach to a 'live updating' news post in the CMS?
For example, Transfer Deadline Day, where the author will add new minor updates to a live post:
https://www.bbc.co.uk/sport/football/live/cy0p77j5xwrt
I have got it setup with a Matrix at the moment, ...
0
votes
1
answer
19
views
How to use address fields as default title formats in the admin?
I have an entry type 'site' with a default Craft address field in it.
Id like to use the first line of my address field object (called 'label') as the default title format for these entries.
At the ...
0
votes
0
answers
14
views
Pass imager X named transform into Macro
I want to define named transforms in imager-x-transforms.php and I cant get it to work.
imager-x-transforms.php
<?php
return [
'shopifySize' => [
'displayName' => 'Shopify Export'...
0
votes
1
answer
21
views
S3 is blocking my upload attempts
I'm not sure why this is happening now because I've uploaded files to S3 on this site before (perhaps Amazon has changed something?) but when attempting to upload images to an S3 volume just now, I'm ...
0
votes
0
answers
31
views
Set site to offline with offline.twig template and getting 503 error
I recently migrated my local Craft CMS5 build to the server, and everything was going well until I tried enabling the “offline” mode. The offline mode and template work as expected on my local. ...
0
votes
1
answer
20
views
Taking Craft instance offline during maintenance
My Craft instance contains two sites with two seperate domains:
english.site.com (default)
french.site.com
When I shut down my instance with php craft off, it only shuts down the second site, not ...
0
votes
1
answer
22
views
special characters not properly handled
I want to create an index of entries ordered by title. The title may start with a special character like Ä, Ö, Ü.
I created a range of possible first characters (shortened in the code below) and then ...
0
votes
0
answers
12
views
Can Craft display image information for .AVIF files?
When I view an assets folder in Craft, AVIF files don't display their meta info, i.e., dimensions. Can this be done?