Forum:Need help with infobox code

Anyone an idea how I add an switch inside in repeat in an infobox?

this:

Inside this:

--- Currently I get no error inside the code but will it result just into an empty space. So I think this will not support. Any idea how to fix it?

I used the source of the repeat template for this:

--Jens Ingels 22:13, June 11, 2012 (UTC)
 * It would almost certainly be helpful if you could more fully explain what you're trying to accomplish, and if you could provide a link to the template you're trying to create. I'm at a loss as to what you mean by "the repeat template", as there is no template named "repeat" in the code you've provided.  There are certainly things I wouldn't do in the code you've provided — like using the raw HTML command —  but without having a better grasp of what you're trying to do, I can't really advise you.


 * In general, though, I will say that it's easy to nest a #switch inside an #if statement. However, #if statements are binary.  They say, "If the condition of this ONE variable is something, then do this thing over here.  If not, then do this other thing."


 * Your #if statement is beyond confusing. You're saying, "#if 10 variables exist —  through  — then output this Stats thing."  That's just not going to work.  You need to focus on the condition of one variable only (or an #expr derived from a mathematical formula using several variables, but that doesn't apply here).  Just looking at the code you've presented, I'd say that you wouldn't get an error, nor would you get results.  Nothing will satisfy your #if statement, so the template has no choice but to produce no results.


 * How do you fix it? Probably quite easily — but we need you to explain your goals more clearly.       23:01: Wed 13 Jun 2012

Here's the link of the template. I thought that the codes that I wrote down where enouge. The infobox exist out 2 tables. 1 nav table and 1 infobox. Here's an result example.

The infobox is in fact an infobox inside an infobox:

I in fact only need an solution how to let to work this:

In the place of this: Very low. Btw I colored it red to point out what needed to replaced. The font code it not from the template itself.

--Jens Ingels 12:01, June 14, 2012 (UTC)


 * The switch above does work assuming that exists and is between 0,5 and 4,5. You can provide a 'not found' return and a return for when the parameter is empty. You can also combine those with like returns as well...


 * Rappy 12:32, June 14, 2012 (UTC)

It works, thx

However after adding these things, I got back an error when I put to 8,9 or 10. The error is not from the template but from the string: " Error: String exceeds 1,000 character limit "



EDIT: Error example here: --Jens Ingels 13:37, June 14, 2012 (UTC)