toastnz/svg
Composer 安装命令:
composer require toastnz/svg
包简介
A skeleton for Silverstripe CMS modules.
关键字:
README 文档
README
This module enables the usage of the $SVG('SVG_FILE_NAME') variable in SilverStripe templates and block templates. It allows you to easily include SVG files within your templates by referencing their file names.
Installation
To install this module, you can use Composer:
composer require toastnz/svg
Configuration
To set up the module, you need to specify the svg_base_path under the Page class in your YAML configuration file (app/_config/config.yml).
Page:
svg_base_path: '/path/to/svg-folder/'
Make sure to replace '/path/to/svg-folder/' with the actual path to your SVG files.
Usage
Once the module is installed and configured, you can use the $SVG('SVG_FILE_NAME') variable in your SilverStripe templates. Here's an example of how to include an SVG file:
$SVG('logo')
统计信息
- 总下载量: 5.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2023-06-27