Talk:Crafting/dpl

I'd REALLY love to get the code working for: "if &#123;{name}} isn't blank, then use it, else use &#123;{%PAGE%}}"

Unfortunately I can't seem to get it working, so I replaced %PAGE% with name (i.e. simply made the name variable mandatory), and update each crafting station item page to add it.

There's already a precedent for using the name variable though, I'm not just pulling code out my rear end. Look at Cooking Pot/Cauldron - they're both on the Cooking Pot page, however the former has no name variable (i.e. it defaults to the page name) whereas the latter has "Cauldron" assigned to name.

If anyone can get that if-else bit working that would be excellent. - Spinfx (talk) 12:47, 26 October 2015 (UTC)

Sorry, if it wasn't clear, I'm referring to the 3rd line. See the name variable given as the first parameter to the il2c function in the middle there. Which I'm guessing comes from Template:Il2c. Additionally, I'd like to do the same for the image link as well - currently it's also hardcoded to %PAGE%, but I'd like to do a check against the "image" variable and use that if not blank, since some item pages do have infobox images that don't match the page name. - Spinfx (talk) 12:51, 26 October 2015 (UTC)