add an option to choose the position of bootstrap.js load

Issue #63 on hold
created an issue

Edit bootstrap.php to add a user configurable var to set the positon for loading corescripts

$this->coreLoadPosition = CClientScript::POS_END;

$cs->registerScriptFile($this->getAssetsUrl().'/js/bootstrap.min.js', $this->coreLoadPosition);

Comments (3)

  1. Manuel reporter

    Or, even better, let bootstrap take the global configuration from

          'coreScriptPosition' => CClientScript::POS_END,
    		$cs->registerScriptFile($this->getAssetsUrl().'/js/bootstrap.min.js', Yii::app()->clientScript->coreScriptPosition);
  2. Christoffer Niska repo owner

    I'm not sure why you would want this feature. I'm really reluctant to adding additional public properties to the already huge Bootstrap component class. Please give me an example of where you'd need this and I'll consider it.

  3. Manuel reporter

    I have an application that loads all js at the end of the page instead of head. Another reason may be that I want some js to load before or after the others. I'm sure that only adding a property will not impact so heavily on the component

  4. Log in to comment