Questions tagged [extends]
The extends tag has no usage guidance.
16
questions
1
vote
1
answer
106
views
How to Extend Craft CMS frontend controller?
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 ...
1
vote
1
answer
61
views
Not triggering SEOMatic on save element
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 ...
2
votes
3
answers
1k
views
Templating basics: extend, include or use?
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 ...
1
vote
1
answer
122
views
Can a plugin manually raise another plugin's Event?
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 ...
0
votes
2
answers
144
views
Set Parent Template Defined Content to Output in Child Template
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 ...
4
votes
1
answer
428
views
The safest way to edit core Craft files?
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 ...
1
vote
1
answer
237
views
Plugin Development: extending a vendor plugin
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 ...
2
votes
1
answer
449
views
Why is news/_entry not extending _layout?
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.
{% ...
1
vote
1
answer
219
views
Custom Asset Source Types - not possible
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 ...
2
votes
2
answers
2k
views
Send a block... into a block?
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:
&...
2
votes
1
answer
287
views
How to extend UserRecord?
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 ...
1
vote
1
answer
302
views
Override a portion of an extends template
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 ...
1
vote
1
answer
505
views
What happens when extending an extended template?
If template2.html contains {% extends 'template1.html' %}
and template3.html contains {% extends 'template2.html' %}, what happens to things like {% block %}{% endblock %} and variables?
2
votes
1
answer
156
views
Change title url of elementtype in the list
I have a plugin. In this plugin I did elementtype which extends the user one, but with only one source "clients". I have and New Client button which points to my plugin Plugin_ClientController which ...
4
votes
2
answers
870
views
How do I extend another plugin?
I'd like to know if it's possible to extend another plugin with my own.
I'm currently using the Sprout Forms plugin to create a contact form on our website, and I would like to extend that so when a ...
9
votes
2
answers
32k
views
Is there a way to define a global var within a twig block?
Something that would work like this:
{% block A %}
{% set testVar = "foo" %}
{% endblock %}
...
{% block B %}
{{ testVar }}
{% endblock %}
The scope of testVar seems limited to {% block A %}
I'...