Typo in release note
Closed this issue · 4 comments
This is not a bug, just a note regarding this announcement: https://github.com/terminal42/contao-mp_forms/releases/tag/4.2.0
form_mp_form_page_switch
should be form_mp_form_pageswitch
, because customTpl
infers template names from $GLOBALS['TL_FFL']
, which has mp_form_pageswitch
in your config.php
Well, actually it IS a bug – in order for custom template to work in frontend, it has to be named form_mp_form_page_switch
, but that does not show up in template selector. Selector only shows template group form_mp_form_pageswitch
, but then it does not use it in frontend. and then it works fine since Widget::parse()
uses customTpl value directly from the database, if present.
Update after more testing: if you copy default form_mp_form_page_switch.html5
template into app templates, it will
override the default, but backend will not indicate it (just shows "Default" instead of "global, Default" in template selector). If you then decide to create more different custom templates by adding _something_else
to the template filename, you will not be able to find them in the template selector without changing page_switch
part to pageswitch
.
I'll rename it from form_mp_form_page_switch
to form_mp_form_pageswitch
in v5.