Board Thread:Support Requests - Getting Technical/@comment-26542627-20200726205727/@comment-26542627-20200731034126

Thanks, but isn't that what I said, even in the OP? That's why I thought I needed IF statements, because wiki1 or wiki2 may not always be there, either as named parameters, or as values to and  (positional parameters). One of them will always be there, but it's unknown which it will be, whether it's a named parameter or positional, and what order they'll be in if both are present. The issue is when "wiki2" becomes a value of because it needs to link to "w:c:wiki2Name".

Here's a list of use cases: -
 * |wiki1
 * |wiki1=PageABC
 * |wiki2
 * |wiki2=PageXYZ
 * |wiki1|wiki2
 * |wiki2|wiki1
 * |wiki1=PageABC|wiki2
 * |wiki2|wiki1=PageABC
 * |wiki1|wiki2=PageXYZ
 * |wiki2=PageXYZ|wiki1
 * |wiki1=PageABC|wiki2=PageXYZ
 * |wiki2=PageXYZ|wiki1=PageABC
 * Cases 2, 4, 11-12 are fine because all stuff included in the template are named parameters. I just use the right parameter & value where I want it.
 * Cases 1, 5, 9-10 are also fine because = "wiki1". I can make  default link to "wiki1Name". If  exists (case 5), it would link to "wiki2Name".
 * Case 6 isn't an issue because both and  link to their respective wikis using PAGENAME anyway.
 * Cases 3, 7-8 are the issue because = "wiki2".

What I believe I need to do is check if = "wiki2" and then link it to " w:c:wiki2Name: ". - Before posting the above (and after rewriting it because this forum system lost the reply), I think I came up with the solution. Each line is in a bullet for easier reading:



It appears to work for all 12 use cases, but I'm going to verify it this weekend with fresh eyes. If you guys have any suggestions on how I can reduce the template code w/o losing functionality, I would appreciate it. I also appreciate the effort thus far nonetheless.