Repository navigation
Template Element Layout does not support custom module paths #10714
|
I'm trying to build a few Element layouts using the new unified Element Editor in Craft 4. I've created my default fields as FieldLayoutElements and they are displaying fine. But I also have the need to output some additional HTML that isn't a field. I think I'd do this with something like the Template UI Element I can create a simple UI Element that does what I need but I think it would be nice if either:
The settings I've been exploring this in are via Everything else is working fine and the data gets submitted correctly if I create a simple HtmlUiElement Field Layout Element. But, as I've run into this twice already in my first pass at updating Elements I thought I'd post as it feels like it would be nicer if the simple HTML use case was supported by Craft, which I think the Template UI Element is intended to do minus the path restrictions. |
Replies: 1 comment 1 reply
|
Just added a new new Html($html) |
Just added a new
craft\fieldlayoutelements\Htmlfield layout element class, which you can use in field layouts that aren’t meant to be user-editable, rather thanTemplate. Pass whatever HTML you want into its constructor, which could originate from a template if you want: