Skip to main content

Questions tagged [extends]

0 votes
0 answers
69 views

i have a new project multisite and multilanguage, i need to create a custom Element Type to manage Custom Products (purchasable). I read many times the docs (https://craftcms.com/docs/5.x/extend/...
simone's user avatar
  • 11
1 vote
1 answer
153 views

please can someone help me with this snippet of code I have written. I basically would like to check if a user is new. However, the below only triggers when an existing user is saved, not when a new ...
Mark's user avatar
  • 761
1 vote
1 answer
217 views

How to extend craft's front end controllers? I don't want to use twig. I like twig but I don't want to use it in craft. Respect my decision and help me. Is there a good way to do that?. So I can ...
user's user avatar
  • 63
1 vote
1 answer
127 views

I'm writing a module that loops over lines in a CSV file to save them as entries. For every entry I save with elements->saveElement($element);, SEOMatic will queue a job that regenerates the ...
Joorren's user avatar
  • 305
2 votes
3 answers
2k views

I'm making first steps with Twig in Craft. Ok, it's a Twig question. But maybe you can give me the best practice for Craft? I'm used to create templates Top-Down, like having a master.html template ...
Urs's user avatar
  • 649
1 vote
1 answer
144 views

I have created an Adjuster which is attached to commerce_lineItems.onPopulateLineItem. The discount criteria is based on validation of a completely separate coupon API, so I created a permission-less ...
casey's user avatar
  • 447
0 votes
2 answers
178 views

I have a layout template, we'll call that Template A that is extended by another template, we'll call that Template B that includes another template, we'll call that Template C that includes another ...
Christopher Healey's user avatar
4 votes
1 answer
495 views

I've been tasked with adding a column to the Entries screen to show some custom data that gets saved against each new post. To do this, I've edited craft/app/elementtypes/EntryElementType.php and ...
Chris's user avatar
  • 55
1 vote
1 answer
295 views

I'm using composer to import a third-party (vendor) plugin into my own Craft plugin. But can't figure out how I extend the functionality of the imported (vendor) plugin. For example assuming imported ...
Cole Henley's user avatar
  • 1,781
2 votes
1 answer
480 views

I'm quite sure the problem is my paths to .css files in the _layout.html file but just can't get my head around it. I've got this in my _layout.html. It works for home page and news page. {% ...
Miksu Aaja's user avatar
1 vote
1 answer
242 views

I would love to extend Craft with a custom AssetSourceType. However it looks like components of type 'assetSource' are not extensible (enableForPlugins = false). Is there a way to do this? Or can I ...
Oliver Stark's user avatar
2 votes
2 answers
2k views

I'm fiddling around with Twig and CraftCMS, trying to create a component-based structure... of sorts. All good so far, except this one thing I got stuck on. Here's an excerpt from my main layout: &...
Ole's user avatar
  • 245
2 votes
1 answer
323 views

I'm writing a customer portal plugin that will have 3 types of users. Organizations Organization members Private I would like to use Craft's built in UserRecord for front end login, backend management,...
CodeMonkey's user avatar
1 vote
1 answer
408 views

I'll give you my specific use-case here and then see if it might also be more generally applicable in other scenarios: We have a new Craft PRO site running happily, and in our /templates/ we have a ...
Neal Magee's user avatar
1 vote
1 answer
591 views

If template2.html contains {% extends 'template1.html' %} and template3.html contains {% extends 'template2.html' %}, what happens to things like {% block %}{% endblock %} and variables?
kr37's user avatar
  • 1,355

15 30 50 per page