定制 contenir/contenir-brand 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

contenir/contenir-brand

Composer 安装命令:

composer require contenir/contenir-brand

包简介

Contenir brand head tags — favicon set + theme/brand colours

README 文档

README

Brand head tags for Contenir/Laminas MVC sites — the favicon <link> set plus theme/tile colour <meta>, driven by the site.brand Branding settings the CMS writes.

Install

composer require contenir/contenir-brand

The Laminas component installer registers the Contenir\Brand module automatically (it only provides view helpers — no routes or services).

Usage

Replace the hand-built favicon block in your head/meta partial with:

<?= $this->faviconTags() ?>

FaviconTags is file-existence driven: it probes the web root and emits a <link> only for the icons that actually exist, so one helper serves both the modern RealFaviconGenerator set (favicon.svg, favicon-96x96.png) and the legacy set (favicon-16x16.png, favicon-32x32.png, safari-pinned-tab.svg). It always emits <meta name="theme-color">, and msapplication-TileColor / mask-icon color when those colours are configured.

Settings

'site' => [
    'brand' => [
        'theme_color' => '#ffffff', // <meta name="theme-color">
        'tile_color'  => '#da532c', // optional — <meta name="msapplication-TileColor">
        'mask_color'  => '#5bbad5', // optional — <link rel="mask-icon" color="…">
    ],
],

Icon files are expected at the web root (public/): favicon.ico, favicon.svg, favicon-16x16.png/-32x32/-48x48/-96x96, apple-touch-icon.png, safari-pinned-tab.svg, site.webmanifest. Generate them from a single source in the Contenir CMS Branding panel.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-06-24