Forum:Template with params passed as a param to another template

I've been working on this for a few hours now and I'm just stumped. I'm trying to create a template that has a nested template as one of the parameters. The nested template also has parameters, but I don't think that's where my problem is coming from, because I tried changing the nested template to a simple table, like this:

When I put that template by itself on a page it works fine, I get a table that stretches the page and contains a single row with a single cell that says "Test". However, when I try to set that template as the parameter to the main template, it doesn't turn out right. I get a bunch of extra pipes and dashes and curly brackets that shouldn't be there. I just can't understand why this doesn't work, because if I change the table to a simple image, it works fine.

Please, if anyone can help me out I'd be super grateful, I'm going nuts here trying to get this to work.

HaLo2FrEeEk 06:15, January 25, 2012 (UTC)


 * So, since I'm having trouble visualizing your template tree, let's simplify the problem a little bit (for my sake):


 * Template A is just
 * Template B is:
 * So then, the article would be  right? 06:51, January 25, 2012 (UTC)


 * Update: I got this working here (with the templates being here and here respectively). 06:56, January 25, 2012 (UTC)


 * Well, the main template (A) is a little more complex, and the sub template (B) has parameters passed to it. I managed to figure out how to get B into A by passing B as the template name to A, but since B has params...I'm stuck. I tried passing it like this:


 * A|param1|param2|etc


 * But the vertical pipe stops the input, so I changed it to:


 * A|param1|param2|etc


 * But then the vertical pipe just comes through as text, so instead of getting the template B embedded in A, I just get the text:


 * A|param1|param2|etc


 * Update: Now I'm convinced that it's the table that's breaking it. Template B is a table, and so is template A. Essentially, I'm trying to put a table into a table cell, which shouldn't be a problem, it works perfectly fine in normal HTML. I changed template B to this:
 * So that embedding B into a page and passing that param would display whatever value you passed, simple. I passed it to A like this:
 * And it worked just fine. When I change B back to a table, things break. HaLo2FrEeEk 07:50, January 25, 2012 (UTC)
 * Have you tried ?   is sometimes used to stop pipes from breaking stuff. 20:56, January 25, 2012 (UTC)
 * And it worked just fine. When I change B back to a table, things break. HaLo2FrEeEk 07:50, January 25, 2012 (UTC)
 * Have you tried ?   is sometimes used to stop pipes from breaking stuff. 20:56, January 25, 2012 (UTC)