@joelnet@rikki_js For whomever needs this. This is how I define a template:
15:12 PM - 23 Jun 2019
0
2
Derk-Jan Karrenbeld
@sleeplessbyte
@joelnet@rikki_js ...and this is how you call it (yes it's just a generic function that takes the template arguments 'error' and 'details' as keys):
15:14 PM - 23 Jun 2019
0
0
Derk-Jan Karrenbeld
@sleeplessbyte
@joelnet@rikki_js Here is all the important bits of the code if you're wondering how this is built:
15:22 PM - 23 Jun 2019
0
1
Derk-Jan Karrenbeld
@sleeplessbyte
@joelnet@rikki_js The generated output can be one of three things. It forwards the template and params, like you see here, OR it fills in the template and outputs a string....
15:19 PM - 23 Jun 2019
0
1
Derk-Jan Karrenbeld
@sleeplessbyte
@joelnet@rikki_js ...or it uses that "template identifier" and forwards the params like here:
15:20 PM - 23 Jun 2019
0
1
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For completeness 🔥