Download the PHP package melisplatform/melis-cms-page-script-editor without Composer
On this page you can find all versions of the php package melisplatform/melis-cms-page-script-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download melisplatform/melis-cms-page-script-editor
More information about melisplatform/melis-cms-page-script-editor
Files in melisplatform/melis-cms-page-script-editor
Package melis-cms-page-script-editor
Short Description Melis Platform Page Script Editor
License OSL-3.0
Homepage https://github.com/melisplatform/melis-cms-page-script-editor
Informations about the package 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
These instructions will get you a copy of the project up and running on your machine.
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
Run the composer command:
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 > Site Tools > Sites menu, select a site, then activate the module in the 'Module Loading' tab.
Database
Database model is accessible via the MySQL Workbench file:
Database will be installed through composer and its hooks.
In case of problems, SQL files are located here:
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
- 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
- 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
-
MelisCmsPageScriptEditorService
-
This service's functions include the retrieval and adding of page or site's scripts.
- 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
There are three listeners inside the module:
- MelisCmsPageScriptEditorSavePageListener
- MelisCmsPageScriptEditorSaveSiteScriptListener
-
MelisCmsPageScriptEditorScriptTagListener
-
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
- Melis Technology - www.melistechnology.com
See also the list of contributors who participated in this project.
License
This project is licensed under the Melis Technology premium versions end user license agreement (EULA) - see the LICENSE.md file for details
All versions of melis-cms-page-script-editor with dependencies
melisplatform/melis-core Version ^5.2
melisplatform/melis-cms Version ^5.2