Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4240474
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:10:10+00:00 2026-05-21T03:10:10+00:00

If I have a simple table on a MediaWiki page like this: {|{{#vardefine:new|style=background: none

  • 0

If I have a simple table on a MediaWiki page like this:

{|{{#vardefine:new|style="background: none repeat scroll 0% 0% gold;"}}
|- {{#var:new}}
| hi
|}

and I press Rich Editor to switch to FCKeditor, the table code will change to:

{|
|-
| hi
|}

(So #vardefine and #var are removed!)

I have the VariablesExtension installed.

How can I prevent this? I’m posting it here (SO) because I assume this is a problem which can be fixed using different code on the page. Note that if the code is not in a table, there is no problem.

Note: if there are no variables in the table, there is also no problem:

{|style="background: none repeat scroll 0% 0% gold;"
|-
| no variable
|}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:10:11+00:00Added an answer on May 21, 2026 at 3:10 am

    I found the solution but it is a bit of a monster. You need to create a template and use it in the table. In this example, the third (and final) parameter defines the colour of the cells (previously defined by a variable in the table – now that variable has been moved to the template).

    The template will look like this:

    <!-- Get color for this row
    -->{{#switch: {{{3|new}}}|
     | New
     | new
     | n = {{#vardefine:color|bgcolor=lightsalmon{{!}}}}
     | Open
     | open
     | o = {{#vardefine:color|bgcolor=khaki{{!}}}}
     | Closed
     | closed
     | c = {{#vardefine:color|bgcolor=lightgreen{{!}}}}
     | #default = {{#vardefine:color|bgcolor=gold{{!}}}}
    }}<!-- Add color for each cell in the row -->
    |-
    | {{#var:color}}{{{1|parameter 1}}}
    | {{#var:color}}{{{2|parameter 2}}} }}
    

    The table will look like this:

    {{template_name|parameter 1|parameter 2|parameter 3}}
    {{template_name|parameter 1|parameter 2|parameter 3}}
    {{template_name|parameter 1|parameter 2|parameter 3}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple table ( Person_ ) like this: ID_ EN-EN_ FR-FR_ 1
I have a simple table like this: CREATE TABLE `users` ( `id` int(11) unsigned
Suppose I have simple table like this: ID (PRIMARY) time (INT) stage (TINYINT) other
I have a simple table for reference page: id name description image In reference.php,
I have a simple table: ID | Value When I do this: var sequence
Assuming you have a simple table like the following: +---------+---------------------+ | user_id | activity_date
I have a simple table with 1,000,000 rows. this row has a datetime field
i have a simple table data like: date | Jenna | Tom | Robin
I have a simple table like: | fkId | Item | --------------- | 1
I have a simple table: <table cellpadding=0 cellspacing=0 style=width:600px> <tr> <td style=width:100px; padding:5px; border:1px

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.