Download the PHP package nthmedia/cp-site-icons without Composer
On this page you can find all versions of the php package nthmedia/cp-site-icons. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nthmedia/cp-site-icons
More information about nthmedia/cp-site-icons
Files in nthmedia/cp-site-icons
Package cp-site-icons
Short Description Display site icon when editing entries
License MIT
Informations about the package cp-site-icons
CP Site Icons plugin for Craft CMS
Display site icon when editing entries, to be able to distinguish between different sites.
Requirements
This plugin requires Craft CMS 5.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project -
Then tell Composer to load the plugin:
composer require nthmedia/cp-site-icons -
In the Control Panel, go to Settings → Plugins and click the "Install" button for CP Site Icons. Or enable it through the command line:
./craft plugin/install cp-site-icons -
You can choose if you want the site handle or site language as key to distinguish your sites. This key is also the key of the icons array in the config.
- Create
/config/cp-site-icons.phpand add your configuration.
Configuration
Basic example with emoji flags
Custom CSS properties
You can also use handles and/or custom CSS properties:
Position
By default, icons are shown on the page title when editing entries. Since version 3.1.0, you can also replace the globe icon in the breadcrumb bar with a site icon.
Use the position option to control where icons appear:
When position is omitted, it defaults to ['pageTitle'] for backwards compatibility.
Credits
- Brought to you by NTH media
- Based on a code snippet of Dennis Frank, shared at DotAll 2021.