Fixed E-Mail templater is missing params

Sure :)

Being able to access to app object gives a lot of flexibility, for example we could get tosUrl even if no dedicated param is available.

Another quite useful use case is to include links to content like threads without hardcoding the title and URL (which would require updating them if the title or URL changes -> manual maintenance overhead):

Code:
<xf:set var="$thread" value="{{ $xf.app.get('em').find('XF:Thread', 123) }}" />
<a href="{{ link('thread', $thread) }}">{$thread.title}</a>

Obviously this could be done via an Add-on, but being able to just use template code simplifies things in some cases.
 
Noted, we can include it.

I'm mostly asking because we might offer more canonical access for common use cases (including the entity manager and repositories) and limit exposure to the entire container in templates at some point in the future. We don't want to be overly restrictive and are happy to accommodate within reason, but some amount of friction is there by design.
 
limit exposure to the entire container in templates at some point in the future
Totally understandable even though such a change may require more work (for 3rd party Add-ons) then.

My main complaint right now is that the container is available for public and admin templates, but not email - this restriction doesn't make sense to me.

It should either be available for all template types - or none.
 
Last edited:
Back
Top Bottom