Manual placement of external files

Having a widget on the layer template responsible for printing the elements for external files (javascript, css etc) would help to better arrange the position where the elements will be rendered. The manual adjustment will help, for example, with issues related to dependency.

This can be used for inline content, too.

Example code:




<head>

  <?php echo $this->widget('ExternalFiles', array(

    'name'=>'default',

    'type'=>'css',

  )); ?>

</head>


...


  <?php echo $this->widget('ExternalFiles', array(

    'name'=>'bottom',

    'type'=>'js',

  )); ?>

</body>



This would render:




<head>

  <link rel="stylesheet" type="text/css" href="/assets/54867546/style.css" />

</head>


...


  <script type='text/javascript' src='/assets/54867546/common.js'></script>

</body>