Hi,
I'm trying get different templates to load for the ProductsContainer depending on some conditions on page load.
Example:
If a condition is true I want the ProductsContainer to be loaded with "ProductGridItemContainer" otherwise with "ProductDetailsItemContainer".
I have tried to just set the "data-template" with a razor variable to for example "ProductGridItemContainer". That sets the "data-template" correctly but the items are still like it would be set to "ProductDetailsItemContainer" (if that was the previous state).
I guess I need to call "Dynamo.UpdateTemplate('ProductsContainer', 'ProductItemContainer')" at some appropriate point.
I obviously cannot do that in "DOMContentLoaded". Is there a way to know when Dynamo has finished rendering the template?
Regards / Aki