Skip to content

Commit

Permalink
feat(infobox): make the Campaign ID dynamic for the Stay22 accommodat…
Browse files Browse the repository at this point in the history
…ion button (#5158)
  • Loading branch information
Rathoz authored Dec 2, 2024
1 parent dde83a3 commit 1243648
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/infobox/commons/infobox_league.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -34,7 +35,7 @@ local TextSanitizer = Lua.import('Module:TextSanitizer')

local INVALID_TIER_WARNING = '${tierString} is not a known Liquipedia ${tierMode}'
local VENUE_DESCRIPTION = '<br><small><small>(${desc})</small></small>'
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')
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1243648

Please sign in to comment.