User tests: Successful: Unsuccessful:
The new mail template layout introduced in 5.3 (https://docs.joomla.org/J5.x:Managing_Mail_Template_Layout) currently has no access to the actual mail template. This prevents some interesting usecases, accessing the parameters of the template to retrieve extra information.
This PR adds $mail to the rendered layout, making the template available on render.
layouts/joomla/mail/mailtemplate.php
around line 34: var_dump($extraData);die();
No information about the current template is available in the debug output.
The debug output has a "mail" item, comparable to this output:
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PR-5.3-dev
|
@LadySolveig this PR does not add the Mailer object but the Mailtemplate. That’s an stdclass holding the data stored in the DB, so I don’t think the point made in the linked discussion can be applied here.
Not so sure if I understand right.
You want the option to use the data for a specific mail template in the wrapper and that data is not availabel in every mail template?
As Fedik metioned
Because it breaks whole concept of layout system.
The layout is the "end-point", just rendering, nothing more.
I just pinned it because I don't necessarily think the wrapper is the right place.
But I don't intend to block it if that's what you want :) I just linked it as a reference.
@LadySolveig i want the currently used mailtemplate as “context” while rendering the wrapper. As far as I understood Fedik, his concern in the linked comment was that it would provide access to the mailer object (business logic) while in my PR it’s about the mail object (which is just representational data).
I have tested this item 🔴 unsuccessfully on ef2381c
Even after applying patch ,It was working as earlier. It is not showing extrat detail about template. Not able to upload screenshot about Same.
I have tested this item 🔴 unsuccessfully on ef2381c
Even after applying patch ,It was working as earlier.
@shrutidhole123 @Vineet7875 the user interface will remain unchanged, only the available information in the mail layout renderer will change. Have you guys taken that into account?
@shrutidhole123 @Vineet7875 I have updated the test instructions to get a visual confirmation that the patch works, could you please re-test?
I have tested this item ✅ successfully on ef2381c
all the needed information appeard
I have tested this item ✅ successfully on ef2381c
works great!
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-02-27 13:11:38 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
Feature
RTC
|
FWIW #43829 (comment)