chemezov / luya-module-tilda
LUYA模块带Tilda块
1.0.2
2024-09-07 16:48 UTC
Requires
- php: >=7.4
- luyadev/luya-core: *
- luyadev/luya-module-cms: *
- tilda-tools/tilda-php: dev-master
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-09-07 16:49:24 UTC
README
LUYA模块带Tilda块
安装
安装此扩展的首选方式是通过composer。
运行以下命令之一
php composer.phar require --prefer-dist chemezov/luya-module-tilda "*"
或添加以下内容到您的composer.json
文件的require部分。
"chemezov/luya-module-tilda": "*"
用法
为了将模块添加到您的项目,请进入config的模块部分
return [ 'modules' => [ // ... 'tilda' => [ 'class' => 'chemezov\luya\tilda\frontend\Module', 'useAppViewPath' => true, // When enabled the views will be looked up in the @app/views folder, otherwise the views shipped with the module will be used. // Required fields 'cache' => 'tildaCache', 'publicKey' => 'YOUR_PUBLIC_KEY', 'secretKey' => 'YOUR_SECRET_KEY', // Optional fields // You can leave this field empty. In this case, all projects will be shown. 'projectIds' => [ 123, // Project ID 456, // Project ID ], // Block wrapper css class 'defaultBlockCssClasses' => 'b-tilda-content-outer', 'blockGroup' => \app\blockgroups\ProjectGroup::class, // The directory for downloading resources (css, js, img). Make sure it has write permissions. 'assetsPath' => '@webroot/uploads/tilda', 'assetsUrl' => '/uploads/tilda', ], // ... ], 'components' => [ // Do not specify an empty cache, otherwise go beyond the API request limit 'tildaCache' => [ 'class' => 'yii\caching\FileCache', ], ], ];
确保您有正确的写入权限到assetsPath
,并且assetsUrl
可以通过http(s)请求访问。
同时请确保通过cron启动了queue
。
* * * * * cd /path/to/www && ./luya queue/run -v
当通过webhook重新加载资源时,这是必要的。