Closed MoritzLost closed 1 year ago
You could use another name for the block, myquote
instead of quote
.
I don't think we will be able to fix this in a sensible way. The defining part of a blueprint here is its name blocks/quote
. Extending itself - the blueprint with exactly the same name - will crash most implementations, I'm afraid. To the system, the location of the file doesn't really matter - so it cannot differentiate by it either.
@texnixe Thanks for the suggestion, that sounds like a good workaround!
@distantnative Thanks for the explanation! Maybe there should be a sort of optional namespacing system? For example, allow the system to distinguish between @core/blocks/quote
and @user/blocks/quote
, and associate those with the blueprint
folder of kirby and the site, respectively? This could be completely optional so it's backwards compatible.
Anyway, the suggestion by @texnixe sounds like a good idea, and copying the entire YML file over isn't that bad either. Just wanted to know if I'm missing something here. Maybe consider this as a feature request, having the ability to specify core blueprints specifically sounds like it could be useful in some situations.
@MoritzLost I think your namespacing suggestion makes sense. I'm not sure about the syntax, but I see why explicitly referring to a core blueprint may be useful. Could you please create a feature request on https://feedback.getkirby.com?
I'm closing this issue as the current behavior is not a bug as Nico explained.
@lukasbestle Done! https://kirby.nolt.io/489
Description
I'm trying to extend a core block blueprint from my own block blueprint. The documentation only mentions extending the core block blueprints in the context of a blocks field, but I would like to have the block blueprint as it's own file so it can be reused. For example, I want to create a file
site/blueprints/blocks/quote.yml
and extend theblocks/quote.yml
blueprint from the core:This appears to create an endless loop (the page breaks with a memory size exhausted error). This makes sense, since
blocks/quote
refers to the template itself. How could I extend theblocks/quote
blueprint from the core in this case?Kirby Version
3.8.1.1