Social Links
Social links manager for Contensio. Manage site-wide social media links with custom icons and display order.
About this plugin
Social Links - Contensio Plugin
Manage your site-wide social media links from a central admin interface. Add platforms with icons, control display order, and render them anywhere in your theme with one line.
Requirements
- Contensio 2.3 or later
Installation
Composer
composer require contensio/plugin-social-links
No migration needed - links are stored in the core contensio_plugin_entries shared table.
Manual
Copy the plugin directory and activate it from the admin plugin manager.
Features
- 10 built-in platforms - X, Facebook, Instagram, LinkedIn, YouTube, TikTok, Pinterest, GitHub, Mastodon, RSS, plus Custom for any other network
- Auto-fill on platform select - choosing a platform pre-populates the label and Bootstrap icon class
- Custom icons - override the icon for any platform or use any Bootstrap Icons class for custom platforms
- Live icon preview - the icon renders in real time as you type the class name
- Sort order - control the display sequence with a numeric order field
- Status control - mark any link inactive without deleting it
- Settings hub card - shows active and total link counts on the admin settings overview
Admin
Navigate to Tools > Social Links.
Adding a link
- Click Add link
- Select a platform from the dropdown - label and icon are pre-filled
- Enter the full URL (e.g.
https://x.com/yourhandle) - Adjust the label, icon, or sort order if needed
- Click Add link
Fields
| Field | Description |
|---|---|
| Platform | Known network or "Custom" |
| Label | Display name and screen-reader text |
| URL | Full URL including https:// |
| Icon | Bootstrap Icons class (e.g. bi-twitter-x) |
| Sort order | Lower numbers appear first |
| Status | Active or Inactive |
Using in themes
Blade partial
The simplest way - include the partial wherever you want the icons to appear:
@include('contensio-social-links::partials.social-links')
This renders an unstyled <ul> with one <li> per active link, ordered by sort_order. Each link opens in a new tab with rel="noopener noreferrer".
Customise wrapper and icon classes
Pass variables before including:
@php
$socialLinksClass = 'flex items-center gap-6';
$socialIconClass = 'text-2xl text-gray-600 hover:text-blue-500';
@endphp
@include('contensio-social-links::partials.social-links')
| Variable | Default | Description |
|---|---|---|
$socialLinksClass |
flex items-center gap-4 |
CSS classes for the <ul> |
$socialIconClass |
text-xl |
CSS classes for each <i> icon |
$socialLinkClass |
`` | Extra CSS classes for each <a> tag |
PHP helper class
For use in PHP code, controllers, or view composers:
use Contensio\SocialLinks\Support\SocialLinksHelper;
// Get all active links as a Collection of SocialLink models
$links = SocialLinksHelper::all();
// Get one specific platform
$xLink = SocialLinksHelper::get('x');
if ($xLink) {
echo $xLink->url; // https://x.com/yourhandle
echo $xLink->icon; // bi-twitter-x
echo $xLink->label; // X
}
Both methods return empty collections/null gracefully if the plugin table is not yet available.
Built-in platforms
| Key | Label | Icon class |
|---|---|---|
x |
X | bi-twitter-x |
facebook |
bi-facebook |
|
instagram |
bi-instagram |
|
linkedin |
bi-linkedin |
|
youtube |
YouTube | bi-youtube |
tiktok |
TikTok | bi-tiktok |
pinterest |
bi-pinterest |
|
github |
GitHub | bi-github |
mastodon |
Mastodon | bi-mastodon |
rss |
RSS | bi-rss |
custom |
Custom | bi-link-45deg |
For any platform not in the list, select "Custom" and enter any Bootstrap Icons class manually.
Data storage
Links are stored in contensio_plugin_entries:
| Column | Value |
|---|---|
plugin |
contensio/plugin-social-links |
type |
link |
title |
the label |
content |
the URL |
status |
active or inactive |
sort_order |
display position |
data |
JSON: { "platform": "x", "icon": "bi-twitter-x" } |
License
AGPL-3.0-or-later