Skip to content

Instantly share code, notes, and snippets.

@katzueno
Created April 30, 2021 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katzueno/ec50d296effc121bd71194895a3976d4 to your computer and use it in GitHub Desktop.
Save katzueno/ec50d296effc121bd71194895a3976d4 to your computer and use it in GitHub Desktop.
How to add jquery to Block Controller
<?php
class Controller extends BlockController
{
// 省略
public function on_start()
{
// https://documentation.concrete5.org/developers/assets/registering-an-asset
$al = AssetList::getInstance();
$al->register('javascript', 'jquery', 'js/jquery.js');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment