lulububu/bolt-social-media
最新稳定版本:1.0.0
Composer 安装命令:
composer require lulububu/bolt-social-media
包简介
Bolt 5 Social Media Extension
README 文档
README
by Lulububu
How-To
Add the socialmedia field to a contenttype. We suggest creating a singleton settings contenttype, which allows to set the social media fields globally:
settings: name: Settings slug: settings singular_name: Settings singular_slug: settings viewless: true viewless_listing: true singleton: true icon_many: 'fa:cogs' icon_one: 'fa:cog' fields: socialmedia: type: socialmedia label: Social Media group: Social Media
Update the config, in case you adjusted the naming of the settings contenttype.
You can also change the social media fields, in case you need to.
After that you can set your social medias in the settings.
Usage
The social media fields are now added to the twig globals and can be used in your templates.
<ul> {% for name, social in socialmedia %} <li> <a href="{{ social }}" target="_blank" rel="noopener noreferrer" > {{- name -}} </a> </li> {% endfor %} </ul>
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-13