From 12436482a2c845222e87fce32a1ba255fe5db91a Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Mon, 2 Dec 2024 10:53:45 +0100 Subject: [PATCH] feat(infobox): make the Campaign ID dynamic for the Stay22 accommodation button (#5158) --- components/infobox/commons/infobox_league.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/infobox/commons/infobox_league.lua b/components/infobox/commons/infobox_league.lua index ae28d545f17..396384d5670 100644 --- a/components/infobox/commons/infobox_league.lua +++ b/components/infobox/commons/infobox_league.lua @@ -10,6 +10,7 @@ local Array = require('Module:Array') local Class = require('Module:Class') local DateExt = require('Module:Date/Ext') local Game = require('Module:Game') +local Info = require('Module:Info') local Json = require('Module:Json') local Logic = require('Module:Logic') local Lua = require('Module:Lua') @@ -34,7 +35,7 @@ local TextSanitizer = Lua.import('Module:TextSanitizer') local INVALID_TIER_WARNING = '${tierString} is not a known Liquipedia ${tierMode}' local VENUE_DESCRIPTION = '
(${desc})' -local STAY22_LINK = 'https://www.stay22.com/allez/roam?aid=liquipedia&campaign=infobox'.. +local STAY22_LINK = 'https://www.stay22.com/allez/roam?aid=liquipedia&campaign=${wiki}_${page}'.. '&address=${address}&checkin=${checkin}&checkout=${checkout}' local Widgets = require('Module:Widget/All') @@ -278,6 +279,8 @@ function League:createInfobox() local function buildStay22Link(address, checkin, checkout) return String.interpolate(STAY22_LINK, { + wiki = Info.wikiName, + page = self.data.name, address = address, checkin = checkin, checkout = checkout,