PHPackages                             melisplatform/melis-cms-page-script-editor - 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. melisplatform/melis-cms-page-script-editor

ActiveMelisplatform-module

melisplatform/melis-cms-page-script-editor
==========================================

Melis Platform Page Script Editor

v5.3.1(6mo ago)17011OSL-3.0PHPPHP ^8.1|^8.3

Since Mar 24Pushed 6mo ago6 watchersCompare

[ Source](https://github.com/melisplatform/melis-cms-page-script-editor)[ Packagist](https://packagist.org/packages/melisplatform/melis-cms-page-script-editor)[ Docs](https://github.com/melisplatform/melis-cms-page-script-editor)[ RSS](/packages/melisplatform-melis-cms-page-script-editor/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (2)Versions (12)Used By (1)

Melis CMS Page Script Editor
============================

[](#melis-cms-page-script-editor)

This module allows users to add custom scripts and styles at the site and page levels.

Getting started
---------------

[](#getting-started)

These instructions will get you a copy of the project up and running on your machine.

### Prerequisites

[](#prerequisites)

The following modules need to be installed to run the Melis CMS Page Script Editor module:

- Melis core
- Melis engine
- Melis front
- Melis CMS

### Installing

[](#installing)

Run the composer command:

```
composer require melisplatform/melis-cms-page-script-editor

```

The Melis CMS Page Script Editor module needs to be manually activated on the chosen site for the defined scripts to be rendered in front. This will be done by going to MelisCms &gt; Site Tools &gt; Sites menu, select a site, then activate the module in the 'Module Loading' tab.

### Database

[](#database)

Database model is accessible via the MySQL Workbench file:

```
/melis-cms-page-script-editor/install/sql/Model

```

Database will be installed through composer and its hooks.
In case of problems, SQL files are located here:

```
/melis-cms-page-script-editor/install/sql

```

Tools and elements provided
---------------------------

[](#tools-and-elements-provided)

- Scripts tab in Melis CMS' Page System
- Scripts tab in Melis CMS' Tool Site
- Page Script Editor Service
- Listeners

### Scripts Tab in Melis CMS' Page System

[](#scripts-tab-in-melis-cms-page-system)

- A 'Scripts' tab is added inside Melis CMS' page system where the user can add scripts to be inserted after the opening head tag, before the closing head tag, or before the closing body tag of the page when rendered
- The user may opt to exclude the site's scripts in which during the rendering process, only the page's defined scripts are included

### Scripts Tab in Melis CMS' Tool Site

[](#scripts-tab-in-melis-cms-tool-site)

- A 'Scripts' tab is added inside Melis CMS' Tool Site in which the scripts that are set here will be applied to all pages belonging to the site, except for the pages that excluded the site's scripts
- List of pages that exclude the site's scripts are displayed and the user has the option to remove the page from the exception list
- The user also has the ability to add a page to the exception list

### Page Script Editor Service

[](#page-script-editor-service)

```
File:
      - /melis-cms-page-script-editor/src/Service/MelisCmsPageScriptEditorService.php

```

- MelisCmsPageScriptEditorService

    - This service's functions include the retrieval and adding of page or site's scripts.

    ```
    //Get the service
    $pageScriptEditorService = $this->getServiceManager()->get("MelisCmsPageScriptEditorService");

    //Retrieve final scripts of the page
    $resultList = $pageScriptEditorService->getMixedScriptsPerPage($pageId);

    ```

    - Common methods this service is used for are as follows:
        - Retrieving page scripts: getScriptsPerPage(...)
        - Retrieving site scripts : getScriptsPerSite(...)
        - Retrieving site exceptions: getScriptExceptions(...)
        - Saving page or site scripts : addScript(...)
        - Saving exception : addScriptException(...)

- For a more detailed information on the methods, please visit the file.

### Listeners

[](#listeners)

There are three listeners inside the module:

- MelisCmsPageScriptEditorSavePageListener
- MelisCmsPageScriptEditorSaveSiteScriptListener
- MelisCmsPageScriptEditorScriptTagListener

```
Files:
      - /melis-cms-page-script-editor/src/Listener/MelisCmsPageScriptEditorSavePageListener.php
      - /melis-cms-page-script-editor/src/Listener/MelisCmsPageScriptEditorSaveSiteScriptListener.php
      - /melis-cms-page-script-editor/src/Listener/MelisCmsPageScriptEditorScriptTagListener.php

```

- MelisCmsPageScriptEditorSavePageListener

    - This is triggered when the page in Melis Cms' Page Edition is saved or published and will automatically save the script data and the exception configuration defined for the given page
- MelisCmsPageScriptEditorSaveSiteScriptListener

    - This is triggered when the site is saved and will automatically save the script data and the exception configuration defined for the given site
- MelisCmsPageScriptEditorScriptTagListener

    - This is triggered when the page is rendered
    - The scripts for the page will be inserted to its defined destination(after the opening head tag, before the closing head tag or before the closing body tag)
    - If the page exluded the site's scripts, only the page's scripts will be inserted, else, the scripts will be the combination of the site and page's scripts where the site's scripts will always come first during the rendering process

- For a more detailed information on the listeners, please visit the files.

Authors
-------

[](#authors)

- **Melis Technology** - [www.melistechnology.com](https://www.melistechnology.com/)

See also the list of [contributors](https://github.com/melisplatform/melis-cms-page-script-editor/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the Melis Technology premium versions end user license agreement (EULA) - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance69

Regular maintenance activity

Popularity17

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 67.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 ~255 days

Recently: every ~297 days

Total

6

Last Release

181d ago

Major Versions

v4.1.0 → v5.0.02022-06-20

PHP version history (3 changes)v4.1.0PHP ^7.1.3|^7.2|^7.3

v5.0.0PHP ^7.3|^8.0

v5.1.0PHP ^8.1|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8c3d1de854682cd37de2faa73a026b1c83b4b15500f352077581948c5d778ce?d=identicon)[melisplatform](/maintainers/melisplatform)

---

Top Contributors

[![mariateresapomar](https://avatars.githubusercontent.com/u/85868605?v=4)](https://github.com/mariateresapomar "mariateresapomar (33 commits)")[![rbbrioso28](https://avatars.githubusercontent.com/u/9497212?v=4)](https://github.com/rbbrioso28 "rbbrioso28 (5 commits)")[![sircxes](https://avatars.githubusercontent.com/u/21098160?v=4)](https://github.com/sircxes "sircxes (4 commits)")[![jzabate](https://avatars.githubusercontent.com/u/39899634?v=4)](https://github.com/jzabate "jzabate (3 commits)")[![nicole-cayambas](https://avatars.githubusercontent.com/u/55810654?v=4)](https://github.com/nicole-cayambas "nicole-cayambas (3 commits)")[![sgris](https://avatars.githubusercontent.com/u/3981660?v=4)](https://github.com/sgris "sgris (1 commits)")

---

Tags

cmsmodulezf2melis

### Embed Badge

![Health badge](/badges/melisplatform-melis-cms-page-script-editor/health.svg)

```
[![Health](https://phpackages.com/badges/melisplatform-melis-cms-page-script-editor/health.svg)](https://phpackages.com/packages/melisplatform-melis-cms-page-script-editor)
```

###  Alternatives

[melisplatform/melis-cms

Melis Platform CMS module

115.5k15](/packages/melisplatform-melis-cms)

PHPackages © 2026

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