lulububu/bolt-social-media 问题修复 & 功能扩展

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

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

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-13