hi,
for me its not clear what you would like to do. Please setup an fiddle/example
you may pass in model values to the template
an handle dom-structure relevant stuff with if or visible foreach what ever binding.
consider the view as slave to the model.
best regards
noirabys