ol is not defined Error while trying to use Openlayers 3 in Smarty template

ol is not defined Error while trying to use Openlayers 3 in Smarty template

I'm trying to integrate an Openlayers 3 map into an Smarty-template.
The parts of the code work fine when used in a single html-(php)-page. When I integrate this code in the Smaty template, the sites ...