Module:T-Campaign: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Tag: Reverted
Line 87: Line 87:
     templateCall = templateCall .. "}}"
     templateCall = templateCall .. "}}"
      
      
     -- Build instruction content
     -- Use JSON config or fallback to default instruction text
     table.insert(output, "'''READ CAREFULLY'''. These are temporary instructions that will appear only until all parameters outlined here have been filled. Choose 'Edit source' at any time and edit the code below if it already exists. It can also be added manually to any page:")
     local headerText = (campaignData.instructions and campaignData.instructions.header_text)
        or "'''READ CAREFULLY'''. These are temporary instructions that will appear only until all parameters outlined here have been filled. Choose 'Edit source' at any time and edit the code below if it already exists. It can also be added manually to any page:"
   
    local parameterIntro = (campaignData.instructions and campaignData.instructions.parameter_intro)
        or "'''Available Parameters:'''"
   
    -- Build instruction content with configurable text
    table.insert(output, headerText)
     table.insert(output, "")
     table.insert(output, "")
     table.insert(output, "<pre>" .. templateCall .. "</pre>")
     table.insert(output, "<pre>" .. templateCall .. "</pre>")
     table.insert(output, "")
     table.insert(output, "")
     table.insert(output, "'''Available Parameters:'''")
     table.insert(output, parameterIntro)
      
      
     if campaignData.field_definitions then
     if campaignData.field_definitions then
Line 117: Line 124:
             end
             end
         end
         end
    end
   
    -- Optional footer text from JSON config
    if campaignData.instructions and campaignData.instructions.footer_text then
        table.insert(output, "")
        table.insert(output, campaignData.instructions.footer_text)
     end
     end