Difference between revisions of "Talk:CDK Reference/Units"

From War Thunder Wiki
Jump to: navigation, search
(Links to vehicles: Response)
m (Response)
Line 3: Line 3:
 
I was looking into putting links pointing to each vehicle's respective pages, but I'm hitting a wall against the ones whose name do not automatically translate into a matching URL (main culprits being the captured and lend-leased vehicles). It seems the [[Template:Tree-Unit|Tree Unit template]] is able to take the vehicles's in-game ID and get the valid URL for them, which would be optimal for this page; however, it is impractical resources-wise to use the template itself here, as there is simply too many vehicles listed on this one page. Does anyone know how that template works, and whether it's possible to reproduce that same behaviour but only get a link as output, and not an image? --[[User:U41991654|U41991654]] ([[User talk:U41991654|talk]]) 14:38, 27 April 2022 (UTC)
 
I was looking into putting links pointing to each vehicle's respective pages, but I'm hitting a wall against the ones whose name do not automatically translate into a matching URL (main culprits being the captured and lend-leased vehicles). It seems the [[Template:Tree-Unit|Tree Unit template]] is able to take the vehicles's in-game ID and get the valid URL for them, which would be optimal for this page; however, it is impractical resources-wise to use the template itself here, as there is simply too many vehicles listed on this one page. Does anyone know how that template works, and whether it's possible to reproduce that same behaviour but only get a link as output, and not an image? --[[User:U41991654|U41991654]] ([[User talk:U41991654|talk]]) 14:38, 27 April 2022 (UTC)
 
: Hi, you could try the [[Template:Specs-Link|Specs-Link template]], which does exactly what it sounds like you're looking for (takes an ID and outputs a link to its page). Of course, this won't work for units that don't have pages, which will have to be left unlinked, or linked to a relevant page manually. - [[User:U38088265|U38088265]] ([[User talk:U38088265|talk]]) 14:52, 27 April 2022 (UTC)
 
: Hi, you could try the [[Template:Specs-Link|Specs-Link template]], which does exactly what it sounds like you're looking for (takes an ID and outputs a link to its page). Of course, this won't work for units that don't have pages, which will have to be left unlinked, or linked to a relevant page manually. - [[User:U38088265|U38088265]] ([[User talk:U38088265|talk]]) 14:52, 27 April 2022 (UTC)
 +
:: Perfect, exactly what I was looking for, thanks! --[[User:U41991654|U41991654]] ([[User talk:U41991654|talk]]) 17:10, 27 April 2022 (UTC)

Revision as of 17:11, 27 April 2022

Links to vehicles

I was looking into putting links pointing to each vehicle's respective pages, but I'm hitting a wall against the ones whose name do not automatically translate into a matching URL (main culprits being the captured and lend-leased vehicles). It seems the Tree Unit template is able to take the vehicles's in-game ID and get the valid URL for them, which would be optimal for this page; however, it is impractical resources-wise to use the template itself here, as there is simply too many vehicles listed on this one page. Does anyone know how that template works, and whether it's possible to reproduce that same behaviour but only get a link as output, and not an image? --Pwa_ (talk) 14:38, 27 April 2022 (UTC)

Hi, you could try the Specs-Link template, which does exactly what it sounds like you're looking for (takes an ID and outputs a link to its page). Of course, this won't work for units that don't have pages, which will have to be left unlinked, or linked to a relevant page manually. - DnaGonite (talk) 14:52, 27 April 2022 (UTC)
Perfect, exactly what I was looking for, thanks! --Pwa_ (talk) 17:10, 27 April 2022 (UTC)