User tests: Successful: 2 ceford, laoneo Unsuccessful: 0
Joomla 4 code is mostly prioritised to load layouts and their xml files from /components/com_component/tmpl
folder but not from /components/com_component/views/xxxx/tmpl
.
But when editing the menu item, the Joomla3-style /components/com_component/views/xxxx/tmpl/layout.xml
is still loaded instead of Joomla4-style /components/com_component/tmpl/xxxx/layout.xml
.
Same for "componentlayout" field.
Try to edit menu items of a component which as Joomla3-style /views
folder and Joomla4-style /tmpl
folder.
See that Joomla3-style layouts are loaded.
Joomla4-style layouts are loaded.
No.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_menus Libraries |
@laoneo Yes, I have a component which is expected to work on both J3 and J4.
Hence, it has J3-style /views/xxx/tmpl/xxx.[xml|php]
and J4-style /tmpl/xxx/xxx.[xml|php]
layouts.
J3 loads as usual via /views/xxx/tmpl/xxx.[xml|php]
but J4 should prioritize its new /tmpl/xxx/xxx.[xml|php]
.
It's the usual task: we already separated the J4 code in /src
, only layouts are left. The HtmlView
in J4 already prioritises /tmpl/$viewName
as the primary template folder. This patch is just the final step.
Ok, I'm using the same layout files for both versions in DPCalendar but it is legit to have different layout files per Joomla major.
@HLeithner Please check again, Allon has accepted this. Sorry for being so impatient, just want to see this PR merged in the nightly build to continue working on J4-specific layouts.
Needs a second test
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-11 18:18:31 |
Closed_By | ⇒ | HLeithner | |
Labels |
Thanks
I have tested this item✅ successfully on 9b54861
Tricky! I added a Joomla 3 style tmpl structure to com_contacts and added this to the default xml files for both cases:
With J3 or J4 as appropriate.
Without the patch the field appeared with the J3 label in the Details tab immediately beneath the Menu Item Type field.
With the patch the field appeared with the J4 label in the Details tab immediately beneath the Menu Item Type field. QED!
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30983.