PHPackages                             restruct/silverstripe-admintweaks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. restruct/silverstripe-admintweaks

ActiveSilverstripe-vendormodule[Admin Panels](/categories/admin)

restruct/silverstripe-admintweaks
=================================

Various admin tweaks &amp; enhancements

4.0.2(4mo ago)2788↓33.3%2[7 PRs](https://github.com/restruct/silverstripe-admintweaks/pulls)2MITSCSSCI passing

Since May 19Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/restruct/silverstripe-admintweaks)[ Packagist](https://packagist.org/packages/restruct/silverstripe-admintweaks)[ RSS](/packages/restruct-silverstripe-admintweaks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (81)Used By (2)

Restruct Silverstripe Admin Tweaks module
=========================================

[](#restruct-silverstripe-admin-tweaks-module)

This module serves as a portable set of small Silverstripe functionality &amp; styling tweaks by Restruct.

Currently it has been partially updated to SS4+, most stuff is deactivated &amp; will be reactivated when needed in projects.

Functionality:
--------------

[](#functionality)

- ImagePlaceholder functionality (SVG)
- Contact &amp; social media fields in SiteConfig (optional/configurable)
- Raw html head/body tag fields in SiteConfig (optional/configurable)
- Browser-chrome colorpicker field in SiteConfig (optional/configurable)
- Provides a global $themeDirResourceURL ($ThemeDir replacement, eg: `{$themeDirResourceURL('my-theme')}/videos/vid-{$RandomNumber}.mp4`)
- SSViewer\_ExtraIterators (eg "col-2-of-4"): GroupSize, PosInGroup, FirstOfGroup, LastOfGroup, FirstLastOfGroup, GroupOfGroups
- CacheHelpers::cached\_http\_request(), cached\_json\_request() &amp; cached\_jsonLD\_request()
- GeneralHelpers::safelyGetProperty() &amp; download\_and\_save\_asset()
- Various stuff added to Page by PageHelpersExtension
- ScheduledMethodCall class to call any method on a schedule using QueuedJobs module (if installed)
- FormFieldBootstrapExtension to simply add .form-control class to formfields (optional)
- FormFieldTweaksExtension to add classes &amp; attributes to form holders only (combine with -&gt;setFieldHolderTemplate('FormFieldTweaks\_holder'))
- EnforceCMSPermission trait to have DataObjects require CMS access credentials for CRUD actions
- GridFieldConfigs::editable\_orderable()
- SelectiveLumberjack class (fixes Lumberjack to NOT filter listview and also take hide\_from\_cms\_tree (core functionality) into account)
- Sets Session.cookie\_secure true
- Makes UserDefinedForm NOT save to server by default (GDPR)
- Sets slightly higher image quality values &amp; activates WEBP format (if webmen/silverstripe-webp-images is installed)
- Activates MimeUploadValidator (if silverstripe/mimevalidator is installed)
- Sets default ("cacheblock") cache to 24 hours &amp; creates a "appcache" of 1 hour
- Has some email config helpers (see "Email config" below)
- Sets some image manipulation fallbacks in case methods are missing (legacy, focuspoint, cropper)
- Sets a slightly more secure password policy
- Activates googlesitemaps (if module installed)
- Registers FeaturedImage &amp; CurrentYear shortcodes (if shortcode module is installed)
- Adds stylish pageicons for common pagetypes (font awesome icons)
- (Bigfork:) Hides pagetypes that cannot be created &amp; admin sections that clients rarely use
- Hides CampaignAdmin &amp; ReportAdmin in nav (rarely used by clients)
- Groups RedirectedURLAdmin, ArchiveAdmin, QueuedJobsAdmin, SubsiteAdmin and SiteConfig nav-buttons under "Advanced" dropdown (if symbiote/silverstripe-grouped-cms-menu is installed)
- Various Block (Elemental) tweaks (+ block icon/thumbnail preview route at `admin/blocktypeicons`)
- Fix to make empty/unchecked checkboxes in editablegridfields submit data (eg unset)
- Workaround checkboxes being unset by $form-&gt;loadData() when they dont have a 1:1 fieldname/relation on object (set attribute data-setactivecheckboxvalues to force a value onto checkboxsetfields)
- DBDatetime::LegacyFormat() adds back Silverstripe 3/PHP datetime formatting support (SS4 switched to CLDR)
- ...

Untested / dropped-in functionality
-----------------------------------

[](#untested--dropped-in-functionality)

Stuff quickly copied into this module for portability but may need some tweaking/generalization before being actually usable:

- IpAddressField formfield with IP validation (may currently be only usable in front-end, not sure)
- DBNullableInt &amp; MySQLSchemaManagerNullable
- ...

Notes:
------

[](#notes)

- Legacy .margin-left &amp; .small formfield styling -&gt; (v4) just $field-&gt;removeExtraClass('stacked')-&gt;setRows(15)

SiteConfig ... config
---------------------

[](#siteconfig--config)

Set wether to 'decorate' siteconfig or not:

```
# NOTE: this extension adds various extra fields & functionality to siteadmin, activate on a per-project basis
SilverStripe\SiteConfig\SiteConfig:
  extensions:
    - Restruct\Silverstripe\AdminTweaks\Extensions\SiteConfigExtension
  # move 'access' fields to main tab & remove 'access' tab
  rearrange_access_fields: false # (default true)
  enable_browser_color_theme_field: false # (default true)
  enable_subnav_activation_field: false # (default true)
  enable_contact_social_media_fields: false # (default true)
  # use in templates: {$SiteConfig.ExtraHTML_HeadStart.RAW} to include extra html
  enable_raw_head_body_fields: false # (default true)
  # deactivate container classes (or set array to override)
  theme_container_classes: false # default bootstrap container classes
```

Image placeholder
-----------------

[](#image-placeholder)

[![](https://user-images.githubusercontent.com/1005986/177027008-2c711cad-9c0c-47ea-a56a-1dc6f4861ba7.png)](https://user-images.githubusercontent.com/1005986/177027008-2c711cad-9c0c-47ea-a56a-1dc6f4861ba7.png)

Include SVG directly in template:

```

```

Include SVG directly:

```
$ImagePlaceholder(180, 50, 'logo', '', 'rounded')

```

Include SVG as img src (base64 data-uri):

```

```

Email config
------------

[](#email-config)

Define email config in .env (environment) to have it auto-applied:

```
# EMAIL.yml
APP_SYSTEM_EMAIL_SENDER="" # eg System X/Y
APP_SYSTEM_EMAIL_ADDRESS="" # eg noreply@host.tld

# SMTP mailserver, NOTE: SwiftMail 'ssl' => SMTP over SSL/TLS / 'tls' => STARTTLS
# LIVE/Default: Mailgun servers (listen on ports 25, 465 (SSL/TLS), 587 (STARTTLS), and 2525)
APP_SMTP_HOST=""
APP_SMTP_PORT=""
APP_SMTP_ENCRYPTION=""
APP_SMTP_USERNAME=""
APP_SMTP_PASSWORD=""

# Send error logs via email
APP_LOG_MAIL_RECIPIENT=""
APP_LOG_MAIL_SUBJECT=""
APP_LOG_MAIL_SENDER=""
APP_LOG_MAIL_LEVEL=""
```

Show Block design/thumbnails instead of icons in admin UI (Elemental)
---------------------------------------------------------------------

[](#show-block-designthumbnails-instead-of-icons-in-admin-ui-elemental)

1. copy &amp; adapt below section to specific project code css to show designed block previews instead of icons
2. set private static $icon to 'block-design block-section {block-name-offset}'
3. add stacked blocks img to app/client (.block-name-offset sets offset if multiple stacked in one image)

```
i.block-section, button.block-section:before {
  background-image: url(~app/client/imgs/block-group-designs_stacked.png);
  background-position: 0 0;
}
i.block-section, button.block-section {
  &.block-name-offset {&, &:before {
    background-position: 0 -128px;
  }}
  &.block-othername-offset {&, &:before {
    background-position: 0 -28px;
  }}
}

## TODO/REACTIVEATE/UPDATE for SS4:

- JS: Add optional loading feedback overlay to buttons
- JS: Inline gridfieldeditablecolumns datepicker fixes
- JS: Advanced search toggle for modeladmins
- Check & improve
```

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance83

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 88.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~3 days

Total

72

Last Release

62d ago

Major Versions

1.2 → 2.1.32021-02-27

2.3.2 → 3.0.02025-06-24

2.4.0 → 3.0.32025-09-10

3.0.5 → 4.0.02025-10-03

3.0.6 → 4.0.22026-01-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d3680d6353e5f171543435b89965ba2588186ad7ec0ec97cbf572704fec2a4f?d=identicon)[micschk](/maintainers/micschk)

---

Top Contributors

[![micschk](https://avatars.githubusercontent.com/u/1005986?v=4)](https://github.com/micschk "micschk (83 commits)")[![hubertusanton](https://avatars.githubusercontent.com/u/582188?v=4)](https://github.com/hubertusanton "hubertusanton (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

silverstripe

### Embed Badge

![Health badge](/badges/restruct-silverstripe-admintweaks/health.svg)

```
[![Health](https://phpackages.com/badges/restruct-silverstripe-admintweaks/health.svg)](https://phpackages.com/packages/restruct-silverstripe-admintweaks)
```

###  Alternatives

[silverstripe/admin

SilverStripe admin interface

262.6M325](/packages/silverstripe-admin)[colymba/gridfield-bulk-editing-tools

Silverstripe CMS GridField component to upload images/files and edit records in bulk

94677.2k39](/packages/colymba-gridfield-bulk-editing-tools)[stevie-mayhew/hasoneedit

Allows editing the fields of a has\_one object directly in the CMS

21225.4k11](/packages/stevie-mayhew-hasoneedit)[plastyk/dashboard

An extendable dashboard for Silverstripe

2243.0k2](/packages/plastyk-dashboard)[silverstripe/superglue

102.2k](/packages/silverstripe-superglue)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
