Jump to content

User talk:Maikxlx/Template:la-form

Page contents not supported in other languages.
Add topic
From Wiktionary, the free dictionary
Latest comment: 15 years ago by Robert Ullmann

This may be rather pedantic, but couldn't we do:

{{#ifeq:{{PAGENAME}}|{{{1}}}{{{3|}}}|'''{{{2|{{{1}}}}}}{{{4|{{{3|}}}}}}'''|[[{{{1}}}{{{3|}}}#Latin|{{{2|{{{1}}}}}}{{{4|{{{3|}}}}}}]]}}

Seems like it's the same thing, only simpler and more consistent. -Atelaes λάλει ἐμοί 07:32, 22 December 2008 (UTC)Reply

It is not pedantic at all. I appreciate the time you have taken to review my code. It's always good to have a second pair of eyes, and I am always amenable to improvements.
In answer to your question, the replacement of {{#if:{{{2}}}|{{{2}}}|{{{1}}}}} with {{{2|{{{1}}}}}} will not work because the Wiki template engine makes a distinction between undefined parameters and empty parameters. Because there is a third unnamed parameter to this template, {{{2}}} will be defined as an empty string if it's left empty in the call, and in these cases {{{2|{{{1}}}}}} will be rendered as an empty string and not as {{{1}}}.
There are ways around this (e.g. forcing the parameter to be specified; giving names to parameter 3 and 4), but they all involve adding complexity to the calling (paradigm) template, which is the main thing we are trying avoid. --maikxlx (talk) 11:38, 22 December 2008 (UTC)Reply
Huh. Quite right. Nevermind then. :-) -Atelaes λάλει ἐμοί 11:58, 22 December 2008 (UTC)Reply

You may want to consider wrapping the self-reference in ['s, rather than ' bolding: this produces <strong class="selflink"> which can then controlled/modified in CSS for presentation of references to the same page, rather than just <b> which can't be distinguished from other bolding.

Could look like this:

[[{{{1}}}{{{3|}}}#{{#ifeq:{{PAGENAME}}|{{{1}}}{{{3|}}}||Latin}}|{{#if:{{{2}}}|{{{2}}}|{{{1}}}}}{{{4|{{{3|}}}}}}]]

(don't try to put the # inside the conditional, you'll get an odd side effect ;-) Robert Ullmann 08:22, 25 December 2008 (UTC)Reply