[02:23:41] Glad you got it sorted and full agreement with platyellow - trying is the path to understanding, my horrendous mass of imported WP templates on my very first project is testament to that. [03:02:55] I'm having one hell of a time with "so this works, and this works, but why doesn't this work‽" inline in-cell #if statement hell [03:11:07] That's the way of it starting out. [03:14:53] Let folks know if you want a second set of eyes on a specific problem though, we've got plenty of helpful folks in the community [03:15:33] [1/6] ```{{ #if: {{{ITEM_REC1_ITM|-/noinclude}}} | [03:15:34] [2/6] {{!}}width=310 colspan=1{{!}} {{{ITEM_REC1_AMT}}} {{Plink|{{{ITEM_REC1_ITM}}}}} [03:15:34] [3/6] }}||{{ #if: {{{ITEM_REC2_ITM|-/noinclude}}} | [03:15:34] [4/6] {{{ITEM_REC2_AMT}}} {{Plink|{{{ITEM_REC2_ITM}}}}} [03:15:35] [5/6] }}``` [03:15:35] [6/6] in theory, this should work, with or without the width, colspan statement. when i remove it? poof, those cells are now completely outside the bounds of the table haha [03:50:18] [1/3] ooohboy. I'm cursing over here. anyone want to tell me just what is going on here? if I natively call the {{Craftingtable}} template, it will resolve the information just fine. if i call the template from another template, it just... doesn't work properly? [03:50:18] [2/3] just the table called natively(undefined level, not the issue): https://idleiktah.wikitide.org/wiki/Copper_axe/Table [03:50:18] [3/3] the item page, with the table called via an if statement, since it's craftable: https://idleiktah.wikitide.org/wiki/Copper_axe [03:50:19] [03:59:34] Do I have to redeclare variables when i call another template? [04:00:25] Parameter assignments, yes you would. [04:01:05] Parameters are scoped to a single template, to my understanding [04:01:48] There are more complicated ways to persist global values but that's above my skills [04:04:58] Thank you, i appreciate it. I'll work on something to workaround that tomorrow. I'm beat lmao. thanks for the help! [04:06:55] No worries, always tomorrow for more template chaos [17:32:50] [1/4] how do you nest #if statements in wiki templates? for whatever reason, declaring it like this works [17:32:50] [2/4] ```| PRIMARY_SOURCE = {{{PRIMARY_SOURCE}}}``` [17:32:51] [3/4] but like this does not [17:32:51] [4/4] ```| {{ #IF: {{{PRIMARY_SOURCE|-/noinclude}}} | PRIMARY_SOURCE = {{{PRIMARY_SOURCE}}} }}``` [17:36:38] [1/2] not all items have all parameters declared, as not all levels are known and very few items require 6 different items in their recipe. i want to omit the parameter if nothing is set initially (what i'm attempting with the second code iteration). doing it the first way "works" halfway, but will include '{{{primary source}}}' as the parameter's value if {{{primary source}}} is null fr [17:36:38] [2/2] om the initial template parameter [17:41:56] Sorta confused with the second version, so when you say #if {{{PRIMARY_SOURCE}}} your basically asking for that row of code. So if the template your adding is {{Test}} and the template reads {{Test|PRIMARY_SOURCE=1}} it'll display as "PRIMARY_SOURCE = 1" in your example. [17:41:56] [17:43:28] I hope thats what you were asking about, because the string you gave for the one that doesn't work, it will work, your just asking for the entire thing. [17:46:29] it's for a template https://idleiktah.wikitide.org/wiki/Template:Itempage that's calling another template https://idleiktah.wikitide.org/wiki/Template:Craftingtable [17:48:46] the initial {{itempage}} transclusion includes the parameters, but not all parameters are shared by all items. some have just one item used in the crafting recipe, while others have two, some have three, up to six. basically, i'm trying to transclude the inital parameters set for the {{itempage}} call to the {{craftingtable}} call [17:48:47] [1/2] [17:48:48] [2/2] [17:54:40] @amakudaru so I think your looking for something like that on the talk page, it should simplify looking at it, and the ones that aren't represented should have a ndash [17:55:26] at least I think thats what your after, I haven't properly examined the primary source [17:55:55] [1/4] here's the logical steps that the {{itempage}} template takes: [17:55:55] [2/4] *display the infobox to the right [17:55:55] [3/4] *if ITEM_REC1_ITM exists, show the crafting table [17:55:56] [4/4] *if individual parameters exist, set them in the {{craftingtable}} calls [17:55:56] [1/2] [17:55:56] [2/2] [18:00:51] you definitely made it easier to read, but the big disconnect is on the last step of ``` *if individual parameters exist, set them in the {{craftingtable}} calls```i'm attempting to make the if statement to set the parameters, only if those parameters exist [18:04:51] [1/2] what you're doing looks like displaying the "-" in the table if the parameter doesn't exist instead of displaying a null value - which is helpful for displaying the data. [18:04:52] [2/2] When i try to transclude the parameters, nonexistent parameters end up with a value of {{{parameter_name}}} instead of a null value. null isn't too much of an issue, but the {{{parameter_name}}} value is quite ugly. [18:07:00] [1/2] So you'd basically like [18:07:00] [2/2] {{ #if: {{{PRIMARY_SOURCE|-/noinclude}}} {{{PRIMARY_SOURCE}}}| Whatever text or image you'd like here }} for those parameters [18:09:18] [1/2] so something like this? [18:09:18] [2/2] ```|Primary source = {{ #if: {{{PRIMARY_SOURCE|-/noinclude}}}| {{{PRIMARY_SOURCE}}} | "" }}``` [18:15:49] I'm meaning more on the Craftingtable template. My only real experience of calling within a template is for my tournaments which call to a different template so everything is sorted on the BracketCell template itself, so it looks like "{{BracketCellTop-3|{{{RD1-team1|}}}|{{{RD1-seed1|}}}|{{{RD1-score1-1|}}}|{{{RD1-score1-2|}}}|{{{RD1-score1-3|}}}}}" [18:16:29] If the template your calling to is always being displayed, it might be simpler to not wrap it in an If [18:18:52] it's not always going to be displayed - not all items are obtained by crafting, not all items are equippable and have combat stats, not all items are used in crafting recipes, not all items are food, not all items are associated with quests [18:19:53] i'm trying to complicate it on the template side to make it dead simple on the end user making page edits [18:20:38] instead of having to call each template and set the same variables 5 times, call 1 template and all the variables all at once [18:29:49] Not 100% sure myself [18:32:40] thanks for the help! i figured out what was happening, kinda. you have to start setting the parameter before starting the #if statement, or else it breaks it for whatever reason. wikitext syntax is weird [20:32:52] Does anyone have experience using pywikibot to create and update page contents? [20:44:01] where do i look to check if a wiki application is accepted [20:45:49] [1/2] https://meta.wikitide.org/wiki/Special:RequestWikiQueue/754 - its still in review, but you will get a notification at the top of Wikitide by your name to say its been created. [20:45:49] [2/2] https://meta.wikitide.org/wiki/Special:Notifications - But you can always check here too. [20:49:04] thank you