New engineering items

Fragment of a discussion from User talk:Lorak990
Jump to: navigation, search

I like tackling difficult wiki questions, so I had a look at this. Basically you just have to nest the if commands, like in Template:LotS/LootRow, so I went ahead and changed Template:LotS/EpicLootRow to do the same and it works properly. I feel like there should be a more elegant way to do this, but this at least works.

Plujan (talk)05:50, 30 August 2013

Thanks for that, I'd been meaning to take a look at it. If it's a whitespace issue with the table code, that's usually really hard to get around, so short of converting it to HTML your solution is probably the best.

Bobogoobo (talk)10:22, 30 August 2013

there is a lesser known/used wiki table syntax that can usually get around some of the white space issues using double pipes, either prefixing or post fixing the double pipes using Template:!! if you have to nest it.

Check it out here

Zoycite (talk)10:58, 30 August 2013

No, it's the new row code that is the issue. You can't put conditionals that evaluate to false on their own lines because each one will result in a blank line, which creates that extra space. But you can't start the next one on the same line as the end of the previous one either because then the |- goes at the end of the previous line, so the parser doesn't recognize it. Supposedly you can put a line break in nowiki tags at the beginning of the "then" portion to avoid that problem, but I've done that before and it didn't always work, plus it's more code. Nesting the calls works fine.

Bobogoobo (talk)11:59, 30 August 2013

ah yeah that is not a solvable problem. i know exactly what you are describing.

what is trying to be done is not parsable by the parser, in a desirable fashion. the order of operations needed do not exist / function that way.

I have no solution for you. Danxor and I are still trying to figure out a workaround. However I have determined there is no viable long term work around other than a redesign. And that design is still being figured out.


I have done some trickery in SNP2, but it is still not perfect. It does feature the problem. And I have gone with a best alternative though not perfect solution.

Zoycite (talk)12:03, 30 August 2013

Has making a template that transcludes a newline already been tried? Maybe that would work.

Bobogoobo (talk)12:09, 30 August 2013

i do not think i have tried it, however because the newline is white space, it likely will not be interpreted correctly as we are trying to use it as a template parameter.

This basically does not work:

{{Template|{{newline}}{{something else}}{{newline}} }}

Zoycite (talk)22:10, 2 September 2013