Board Thread:Support Requests - Getting Technical/@comment-33878615-20160622233249

Here is the template which I am working on:

(Note: The  template just adds paranthesis and makes the text smaller. E.g.,   is equivalent to  .)

It is called “1sto2.”

Here are some examples showing how it works:
 * → (first appearance of original Foobar) (links to page “Foobar”)
 * → (first appearance of original Lorem ipsum) (links to page “Foobar”)

However, I want a “the” to be added in the last parameter.

Here are some examples of how I want it to work:
 * → (first appearance of original Foobar) (links to page “Foobar”)
 * → (first appearance of original Lorem ipsum) (links to page “Foobar”)
 * → (first appearance of the original Foobar) (links to page “Foobar”)
 * → (first appearance of the original Bar) (links to page “Foo”)
 * (Notice the “the” in the last two examples.)

That is:
 * If one parameter is used, said parameter is the link and link text.
 * If two parameters are used, the first parameter is the link and the second parameter is the link text.
 * If two parameters are used but the second parameter is “the” instead of anything else, the first parameter is both the link and link text, but it also shows a “the” before “original.” If three parameters are used, the first parameter is the link, the second parameter is the link text, and the last parameter must be “the,” which, again, adds a “the” before “original.”

So, basically, the first template is the link, the second template is the link text, and the last template is always “the,” which adds a “the” before the word “original.” The last template will never do anything else.

I tried this:

Now, this adds a “the” before “original” if there is a third parameter. The third parameter can be anything (not just “the”), but that does not really matter.

Anyway, if I wanted to use the same thing for both the link and link text, I would have to do this:

Now, this is not something that I want to do. I want to do this instead:

So, basically, if the last template is “the,” it adds a “the” in the text (before the word “original”).

Could anyone help me with this? I am not too much of a template magician, so I need some help. Thank you!  