Most Popular
1500 questions
4
votes
2 answers
Can you insert Craft variables into SCSS files and have a plugin generate CSS?
I'm using SCSS to write all of my styles and am currently using Codekit for processing it. I want to be able to add some global variables to Craft so I can change color and font vars, which would then be re-compiled into CSS for the site.
Looking…
idahotallpaul
- 459
- 5
- 11
4
votes
1 answer
Cached entries and postDate / expirationDate
How does the {% cache %} tag handle a situation where an entry reaches its post date or expires?
Ian
- 564
- 2
- 11
4
votes
1 answer
Store categories in array by level in controller
I'm making a plugin and I need to get an array from a certain category group where the levels of the array are the same as the level of the categories in the group.
So I used the following code to get all categories in a group.
$criteria =…
Sander Van Keer
- 213
- 2
- 8
4
votes
1 answer
(Commerce) Multiple line items with the same purchasable ID?
I'm using onPopulateLineItem in my plugin to dynamically set the price of products added to the cart based on user input on the front-end -
$lineItem = $event->params['lineItem'];
$size = craft()->request->getPost('size');
$colour =…
Rich Mud
- 43
- 3
4
votes
2 answers
How to output a structure sub-navigation of current page
I've got a single structure menu for my entire site which consists of a title and a single related entry. I use that to output the main menu, which uses this code:
darylknight
- 3,290
- 18
- 42
4
votes
2 answers
How to list all User Groups and Users
I'm nearly there on this one but could use some help. I want to list all User Groups, with all Users listed under each group. For bonus points, this all needs to be alphabetical (Group, then Users). Something like...
User Group A
User Name A
User…
Ian Ebden
- 894
- 6
- 12
4
votes
2 answers
Is it possible to manage language translations without directly accessing the PHP translations file?
It is beautifully described in the docs how to translate static text using translation files.
As the client has no access to that file and managing a php array is not what I want them to do, I am looking for a way to make edits to the translation…
carlcs
- 36,220
- 5
- 62
- 139
4
votes
2 answers
Getting "Internal Server Error: Function 'dump' does not exist" when accessing/creating custom fields
On my in-development version of a site I'm working on, I'm unable to access any of my custom fields without Craft displaying an error that reads:
Internal Server Error Function "dump" does not exist
I can navigate to Settings > Fields but when I…
Adam Snetman
- 939
- 6
- 16
4
votes
1 answer
ElementType CP section does not display table
I can not for the life of me figure out why my cp page will not generate the elements table. On other elementtype pages in the cp there is an XHR request made to a controller called "getElements" and that returns the html for the elements table. On…
Rick Kukiela
- 632
- 5
- 16
4
votes
4 answers
Getting blank screen at domain.com/admin when installing
I'm trying to install Craft for the first time, I've used Ben Croker's requirements check and everything passes, and I'm pretty sure everything else is set up properly, but when I access domain.com/admin to run the install, I just get a blank screen…
EdP
- 61
- 4
4
votes
1 answer
Limit a field to entries by entry type
Is it possible to have an "entries" field but only allow selection to entries of a specific "entry type" within craft?
I'm trying to use entry types as a sort of way to enable interfaces with chunks of content. Requiring specific fields for one type…
Jared Meyering
- 211
- 1
- 4
4
votes
3 answers
Ugly Redactor II and how to fix it with some CSS
Redactor II uses Trebuchet as font, has ugly paddings, giant font sizes and other things.
This must be fixed...
Christian Steger
- 490
- 3
- 14
4
votes
1 answer
How do I show a Garnish hud in the CP
I've written a custom plugin and added a custom button to the right panel of an entry page
Now I'm trying to show a Garnish Hud if I click the red button (like the one when you re-index assets)
The content of the hud would be two radio buttons…
Andreas
- 491
- 3
- 11
4
votes
3 answers
P&T Contact Form plugin: How to display error messages in other languages via Ajax
The validations error message get displayed in main language instead of being translated, you can try here (contact form at bottom):
http://lequartiergeneral.be/en/
The form is being displayed and get response via Ajax.
How to display them correctly…
maunoxyd
- 301
- 1
- 7
4
votes
0 answers
How to handle Craft 3 events in a plugin? Element API is returning null data
The below refers to Craft 3 and the Element API plugin for Craft 3.
I would like to do something when the Element API plugin fires its onBeforeSendData event, I can see in the controller for element there is…
Paul Blundell
- 151
- 3