Template talk:Problems: Difference between revisions

Line 19: Line 19:
::::::: Not sure. I guess it's not too bad once we'd use the search-n-replace to populate it everywhere so users wouldn't have to remember, but it is a bit ugly. I guess that logic has to exist outside the template itself? It's certainly preferable to having users needing to remember to escape any equals characters though, so I'm supportive either way. [[User:Kolano|Kolano]] ([[User talk:Kolano|talk]]) 20:43, 4 December 2016 (CET)
::::::: Not sure. I guess it's not too bad once we'd use the search-n-replace to populate it everywhere so users wouldn't have to remember, but it is a bit ugly. I guess that logic has to exist outside the template itself? It's certainly preferable to having users needing to remember to escape any equals characters though, so I'm supportive either way. [[User:Kolano|Kolano]] ([[User talk:Kolano|talk]]) 20:43, 4 December 2016 (CET)
:::::::: Yes, it must be outside of the template. It's basically assigning a variable with the text before passing it to the template, and it avoids the issue because = has no special meaning when defining a variable. The content of the variable is then "echoed" into the template parameter {{{1}}}, avoiding it wrongly recognizing = as a definition of a specific parameter. Another possible approach is using <tt><nowiki>{{#vardefine:problems| <problems text here> }}{{Problems}}</nowiki></tt> then refactoring {{tl|Problems}} to work directly on that variable instead of the {{{1}}} parameter, but it still looks a bit messy. What do you think, does it look better? - [[User:Jhonn|Jhonn]] ([[User talk:Jhonn|talk]]) 01:55, 5 December 2016 (CET)
:::::::: Yes, it must be outside of the template. It's basically assigning a variable with the text before passing it to the template, and it avoids the issue because = has no special meaning when defining a variable. The content of the variable is then "echoed" into the template parameter {{{1}}}, avoiding it wrongly recognizing = as a definition of a specific parameter. Another possible approach is using <tt><nowiki>{{#vardefine:problems| <problems text here> }}{{Problems}}</nowiki></tt> then refactoring {{tl|Problems}} to work directly on that variable instead of the {{{1}}} parameter, but it still looks a bit messy. What do you think, does it look better? - [[User:Jhonn|Jhonn]] ([[User talk:Jhonn|talk]]) 01:55, 5 December 2016 (CET)
:::::::::: If it can't be embedded it doesn't really matter, the initial nested handling is probably easier to understand. So my vote would be to search-n-replace away with the initial handling.[[User:Kolano|Kolano]] ([[User talk:Kolano|talk]]) 04:12, 5 December 2016 (CET)


== Template Request ==
== Template Request ==