toastnz/svg 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2023-06-27