Template talk:Vendor table row result format
From Guild Wars 2 Wiki
Jump to navigationJump to search
Why didn't you just change the query?--Relyk ~ talk < 19:42, 22 March 2014 (UTC)
- it seemed easier to use one query + variables than to use 7 queries. Besides, I'd end up querying for rarity, weight, level + type at least twice because of using {{prefix attributes}} (can't use item facts b/c we don't store that property for subobjects) -Chieftain Alex 20:00, 22 March 2014 (UTC)
- I'm referring to a single query instead of copypasting the code again. I didn't use a result format because it was simpler and the number of queries isn't an issue yet. It's simpler because we need the ability to override and avoid using variables. I know you love to use variables everywhere, but I want to avoid them when possible.--Relyk ~ talk < 20:24, 22 March 2014 (UTC)
- feel free to tinker. I guess you can check for showFacts + co. on this template instead + save on defining variables. -Chieftain Alex 20:30, 22 March 2014 (UTC)
- zzz. happier now? :)
- idk why the 5,6,7,8,9 parameters were not collapsing into each other, so I wrapped it in an arraymap. ugly but works :( -Chieftain Alex 20:49, 22 March 2014 (UTC)
- feel free to tinker. I guess you can check for showFacts + co. on this template instead + save on defining variables. -Chieftain Alex 20:30, 22 March 2014 (UTC)
- I'm referring to a single query instead of copypasting the code again. I didn't use a result format because it was simpler and the number of queries isn't an issue yet. It's simpler because we need the ability to override and avoid using variables. I know you love to use variables everywhere, but I want to avoid them when possible.--Relyk ~ talk < 20:24, 22 March 2014 (UTC)
- The thought crossed my mind that the top level of the template could just be {{#if: {{{id|}}} | [[Has game context::Item]][[Has game id::{{{id}}}]] | [[{{{item}}}]] }} and the semantic query. This way you could put all the formatting code on the subtemplate for both id+item based queries. There would need to be a neat way of passing the parameters only if they're present.. somehow I failed to achieve this earlier. -Chieftain Alex 22:02, 22 March 2014 (UTC)