You only need to generate a template if you are going to use the template. You don't use it in your code, so why bother to generate it? Get rid of all your template stuff except the preregistering since I see no purpose for it since you never render/use the template at all.
Your code should work if you are preregistering the variable prior to the column template being rendered.
|