Forum:Subtemplate parameters set in main template

I've been working on a template that uses subtemplates that are passed as parameters to the main template. I'll use main and sub (and subt as the name of the subtemplate param in the main template) in my examples:

main: ... blah blah template stuff

more template stuff

sub: ...

...

Basically, I want to include the subtemplate in the main template. I've gotten this part to work, BUT, I want to automatically set one of the subtemplate's params in the main template, where the include happens:

main: ... blah blah template stuff

more template stuff

So that the param someparam in the sub template is automatically set to value when it's included, getting rid of the need to set it within the sub template declaration. As a note, this is how the template is included on a page:

The change I want to do would eliminate the need to set the "someparam" parameter, since it would be automatically set by the main template. Of course, in the real template both "main" and "sub" have more to them, and more parameters, I'm just using these simple mockups as examples.

So, can anyone help? I can't think of any other way to do this, but it doesn't work the way I've tried (presumably because subt is just a parameter as far as main is aware, so I can't pass parameters to it).

I honestly didn't undestand what you want to do, but you can pass a parameter to a subtemplate through the main template: In the main template: Code ...

...

The template call:

I did something similar in this template which is composed by a main template and a sub template.