PHPackages                             melisplatform/melis-front - 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-front

ActiveMelisplatform-module

melisplatform/melis-front
=========================

Melis Platform front module

v5.3.7(3mo ago)25.1k↑361.5%1[2 PRs](https://github.com/melisplatform/melis-front/pulls)6OSL-3.0PHPPHP ^8.1|^8.3

Since May 16Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/melisplatform/melis-front)[ Packagist](https://packagist.org/packages/melisplatform/melis-front)[ Docs](https://github.com/melisplatform/melis-front)[ RSS](/packages/melisplatform-melis-front/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (5)Versions (92)Used By (6)Security (1)

melis-front
===========

[](#melis-front)

MelisFront is the engine that displays website hosted on Melis Platform.
It deals with showing pages, plugins, URL rewritting, search optimization and SEO, etc.

Getting Started
---------------

[](#getting-started)

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

### Prerequisites

[](#prerequisites)

You will need to install melisplatform/melis-engine and melisplatform/melis-asset-manager in order to have this module running.
This will automatically be done when using composer.

### Installing

[](#installing)

Run the composer command:

```
composer require melisplatform/melis-front

```

Tools &amp; Elements provided
-----------------------------

[](#tools--elements-provided)

- Services to update SEO and ressources from templating plugins
- Listenners for SEO, 404 and URL rewritting
- Templating plugins: MelisTag, Breadcrumb, Menu, Search, ListFolder, Drag'n'drop zone
- Special URLs, sitemap

Running the code
----------------

[](#running-the-code)

**[See Full documentation on implementing a website here](https://www.melistechnology.com/MelisTechnology/resources/documentation/front-office/create-a-website/Declareavhostforyourwebsite)**

### MelisFront Templating Plugins

[](#melisfront-templating-plugins)

MelisFront provides many plugins to be used in page's edition:

- MelisFrontTagHtmlPlugin / MelisFrontTagTextareaPlugin / MelisFrontTagMediaPlugin
    This plugin must be called through the use of its helper: MelisTagsHelper.
    File: /melis-front/src/View/Helper/MelisTagsHelper.php

```
// This code will display an editable zone, linked to the current page
// with id about_part1_text, will load the html plugin and therefore a tinyMCE HTML configuration
echo $this->MelisTag($this->idPage, 'about_part1_text', 'html',
                	 'The default text to be shown in the back office')

```

- MelisFrontMenuPlugin
    This plugin is made to generate menu for websites.
    File: /melis-front/src/Controller/Plugin/MelisFrontMenuPlugin.php

```
// Get the plugin
$menuPlugin = $this->MelisFrontMenuPlugin();

// Add some parameters
$menuParameters = array(
	'template_path' => 'MelisDemoCms/plugin/menu', // template to use for rendering
	'pageIdRootMenu' => 1,  // If homepage is ID 1
);
// render the view
$menu = $menuPlugin->render($menuParameters);

// Add the generated view as a child view by the name "siteMenu"
$this->layout()->addChild($menu, 'siteMenu');

```

- MelisFrontBreadcrumbPlugin
    This plugin is made to generate a breadcrumb for websites. File: /melis-front/src/Controller/Plugin/MelisFrontBreadcrumbPlugin.php

```
// Get the plugin
$breadcrumbPlugin = $this->MelisFrontBreadcrumbPlugin();

// Add some parameters
$breadcrumbParameters = array(
	'template_path' => 'MelisDemoCms/plugin/breadcrumb', // template to use for rendering
	'pageIdRootBreadcrumb' => 1,// If homepage is ID 1
);

// render the view
$breadcrumb = $breadcrumbPlugin->render($breadcrumbParameters);

// Add the generated view as a child view by the name "pageBreadcrumb"
$this->layout()->addChild($breadcrumb, 'pageBreadcrumb');

```

- MelisFrontShowListFromFolderPlugin
    This plugin is made to list subpages (folder) from the treeview.
    It can be used to list subpages as a submenu and bring some content as well.
    File: /melis-front/src/Controller/Plugin/MelisFrontShowListFromFolderPlugin.php

```
// Get the plugin
$showListForFolderPlugin = $this->MelisFrontShowListFromFolderPlugin();

// Add some parameters
$menuParameters = array(
    'template_path' => 'MelisDemoCms/plugin/testimonial-slider', // will list the subpages with a slider style template
    'pageIdFolder' => 2, // will list subpages of page 2
);

// render the view
$listView = $showListForFolderPlugin->render($menuParameters);

// Add the generated view as a child view by the name "testimonialList"
$this->view->addChild($listView, 'testimonialList');

```

- MelisFrontSearchResultsPlugin
    This plugin is made to display the search results based on ZEnd\_Search.
    File: /melis-front/src/Controller/Plugin/MelisFrontSearchResultsPlugin.php

```
// Get the plugin
$searchResults = $this->MelisFrontSearchResultsPlugin();

// Add some parameters
$searchParameters = array(
    'template_path' => 'MelisDemoCms/plugin/search-results', // template used
    'siteModuleName' => 'MelisDemoCms', // Site Index to search in
    'pagination' => array(  // pagination parameters
        'nbPerPage' => 10,
        'nbPageBeforeAfter' => 3
    ),
);
// render the view
$searchView = $searchResults->render($searchParameters);

// Add the generated view as a child view by the name "searchresults"
$this->view->addChild($searchView, 'searchresults');

```

- MelisFrontDragDropZonePlugin
    This plugin must be called through the use of its helper: MelisDragDropZoneHelper.
    File: /melis-front/src/View/Helper/MelisDragDropZoneHelper.php

```
// Creation of a dragdropzone link to the pageId and with id "dragdropzone_zone_1"
echo $this->MelisDragDropZone($this->idPage, "dragdropzone_zone_1");

```

**[See Full documentation on templating plugins here](https://www.melistechnology.com/MelisTechnology/resources/documentation/front-office/create-a-templating-plugin/Principle)**

### MelisFront Services

[](#melisfront-services)

MelisFront provides many services to be used in other modules:

- MelisSiteConfigService
    Provides services to retrieve the config for your sites.
    File: `/melis-front/src/Service/MelisSiteConfigService.php`

    `MelisFrontSiteConfigListener` used to update the site's config on the regular config service by merging the config from the file and the one on the database.

    - `getSiteConfigByKey(key, section = 'sites', language = null)`
        This function retrieves a specific config by key.

        ParameterTypeDescriptionkeyStringKey of the config.pageIdIntUsed determine the site id, name, and language and on where to get the configsectionString/IntThe section on where to get the config or site IdlanguageStringLanguage on which to get the configTo call the service.

        ```
        $siteConfigSvc = $this->getServiceManager()->get('MelisSiteConfigService');

        ```

        To get a specific `key` of the current site and the language of the page with id 1

        ```
        $siteConfigSvc = $this->getServiceManager()->get('MelisSiteConfigService');

        $config = $siteConfigSvc->getSiteConfigByKey('key', 1);

        ```

        But what if we wanted to get the key from another language of the current site? We can achieve this by defining the language on where to get the config.

        ```
        $siteConfigSvc = $this->getServiceManager()->get('MelisSiteConfigService');

        $config = $siteConfigSvc->getSiteConfigByKey('key', 1,'sites', 'fr');
        // The language of the page is now overridden by the specified language.

        ```

        We can also get a particular `key` from another site by using the `site Id`.

        ```
        $siteConfigSvc = $this->getServiceManager()->get('MelisSiteConfigService');

        $config = $siteConfigSvc->getSiteConfigByKey('key', 1, 1);
        // Return all the values of the specified key from all languages from the site with id 1.
        // The expected output is an array of values from different languages

        $config = $siteConfigSvc->getSiteConfigByKey('key', 1, 1, 'fr');
        // Return all the values of the specified key for the French language from the site with id 1.

        ```

        There is also a different section apart from sites. Currently, we have two sections which are sites and allSites.

        ```
        $siteConfigSvc = $this->getServiceManager()->get('MelisSiteConfigService');

        $config = $siteConfigSvc->getSiteConfigByKey('key', 1, 'allSites');
        // Returns the key from the allSites section of the config
        // Language for the page is not applied but still used to get the site id and name to map for the config

        ```
- MelisSiteTranslationService
    Provides services to translate text and list all site translations
    File: `/melis-front/src/Service/MelisSiteTranslationService.php`

    - `getText(translationKey, langId, siteId)` .

        ParameterTypeDescriptiontranslationKeyStringKey of the translation.langIdIntAn identifier on which language to get the translationsiteIdIntAn identifier on which site to get the translationTo call the service.

        ```
        $melisSiteTranslationSvc = $this->getServiceManager()->get('MelisSiteTranslationService');

        ```

        To get a particular translation, You need to specify the translation key along with the lang id and site id.

        ```
        $test = $melisSiteTranslationService->getText('key', 1, 1);
        // Retrieves the translation for the language id 1 and site id 1.

        ```

### View Helpers

[](#view-helpers)

Melis Front View Helpers:

- MelisTagsHelper: When called it will create an editable zone in the template of the page.
    The tag must take 3 parameters: the id of page, its own id (unique) and a default text that will be displayed (used when no text has been filled into the zone, so that something is displayed and the template still looks like a template).
    File: /melis-front/src/View/Helper/MelisTagsHelper.php

```
// This code will display an editable zone, linked to the current page
// with id about_part1_text, will load the html plugin and therefore a tinyMCE HTML configuration
echo $this->MelisTag($this->idPage, 'about_part1_text', 'html',
                	 'The default text to be shown in the back office')

```

- MelisLinksHelper: When called it will generate a link to a Melis page, following all rules and possible SEO File: /melis-front/src/View/Helper/MelisLinksHelper.php

```
// This call will generate a link to pageId 1 and it will be an absolute URL including the domain
echo $this->MelisLink(1, true);

```

- MelisDragDropZoneHelper
    File: /melis-front/src/View/Helper/MelisDragDropZoneHelper.php

```
// Creation of a dragdropzone link to the pageId and with id "dragdropzone_zone_1"
echo $this->MelisDragDropZone($this->idPage, "dragdropzone_zone_1");

```

- MelisSiteConfigHelper
    This helper is used to get a specific config for a site.
    File: `/melis-front/src/View/Helper/MelisDragDropZoneHelper.php`
    Function: `SiteConfig(key, sectiom = 'sites', language = null)`

    ParameterTypeDescriptionkeyStringKey of the config.sectionString/IntThe section on where to get the config or site IdlanguageStringLanguage on which to get the configTo call the helper.

    ```
    $this->SiteConfig('key');

    ```

    To get a `specific key` from the config for the `current site`.

    ```
    $config = $this->SiteConfig('key');

    ```

    But what if we wanted to get the `key` from another `language` of the `current site`? We can achieve this by defining the `language` on where to get the `config`.

    ```
    $config = $this->SiteConfig('key', 'sites', 'fr');
    // The language of the page is now overridden by the specified language.

    ```

    We can also get a particular `key` from another site by using the `site Id`.

    ```
    $config = $this->SiteConfig('key', 1);
    // Return all the values of the specified key from all languages from the site with id 1.
    // The expected output is an array of values from different languages

    $config = $this->SiteConfig('key', 1, 'fr');
    // Return all the values of the specified key for the French language from the site with id 1.

    ```

    There is also a different `section` apart from `sites`. Currently, we have two sections which are `sites` and `allSites`.

    ```
    $config = $this->SiteConfig('key', 'allSites');
    // Returns the key from the allSites section of the config

    ```
- MelisSiteTranslation
    This helper is used to get a specific translation for a site.
    File: `/melis-front/src/View/Helper/MelisSiteTranslationHelper.php`
    Function: `getText(translationkey, langId, siteId)`

    ParameterTypeDescriptiontranslationKeyStringKey of the translation.langIdIntAn identifier on which language to get the translationsiteIdIntAn identifier on which site to get the translationTo call the helper method.

    ```
    $this->SiteTranslation('translationKey', 'langId', 'siteId');

    ```

    To get a particular translation, You need to specify the translation key along with the lang id and site id.

    ```
    $text = $this->SiteTranslation('key', 1, 1);
    // Retrieves the translation for the language id 1 and site id 1.

    ```

### Special URLs

[](#special-urls)

MelisFront is using the following URLs as defaults:

- URLs of pages: /.\*/id/(?\[0-9\]+)
    If no speacial naming is used in SEO URLs, pages use this system
- URLs of pages when displayed in BO: /.\*/id/(?\[0-9\]+)/renderMode/melis
    Beeing logged in the back office is of course mandatory
- URLs of pages in preview mode (saved version): /.\*/id/(?\[0-9\]+)/preview
    Beeing logged in the back office is of course mandatory
- SiteMap: /sitemap.html|sitemap.xml|sitemap
    Will display the sitemap based on the Navigation class contained in MelisFront module.
    Site to map will be found thanks to the domain used.
- Search Indexer: /melissearchindex/module\[/:moduleName\]/pageid\[/:pageid\]/exclude-pageid\[/:expageid\]
    This will launch the indexer. moduleName is the site's module name, pageid the id where to start crawling and expageid will exclude some specific page ids from being indexed.

Authors
-------

[](#authors)

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

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

License
-------

[](#license)

This project is licensed under the OSL-3.0 License - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance86

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity94

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~53 days

Recently: every ~104 days

Total

61

Last Release

109d ago

Major Versions

v2.5.0 → v3.0.02018-10-17

v3.2.9 → v4.0.02020-08-17

v4.1.2 → v5.0.02022-06-20

PHP version history (5 changes)v2.1PHP ^5.5 || ^7.0

v3.0.1PHP ^7.0

v4.0.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

[![sircxes](https://avatars.githubusercontent.com/u/21098160?v=4)](https://github.com/sircxes "sircxes (132 commits)")[![rbbrioso28](https://avatars.githubusercontent.com/u/9497212?v=4)](https://github.com/rbbrioso28 "rbbrioso28 (100 commits)")[![fparan](https://avatars.githubusercontent.com/u/39509647?v=4)](https://github.com/fparan "fparan (42 commits)")[![benborla](https://avatars.githubusercontent.com/u/22745294?v=4)](https://github.com/benborla "benborla (40 commits)")[![jzabate](https://avatars.githubusercontent.com/u/39899634?v=4)](https://github.com/jzabate "jzabate (31 commits)")[![ksuson](https://avatars.githubusercontent.com/u/31838758?v=4)](https://github.com/ksuson "ksuson (28 commits)")[![sgris](https://avatars.githubusercontent.com/u/3981660?v=4)](https://github.com/sgris "sgris (23 commits)")[![mariateresapomar](https://avatars.githubusercontent.com/u/85868605?v=4)](https://github.com/mariateresapomar "mariateresapomar (21 commits)")[![jamesrepository](https://avatars.githubusercontent.com/u/10151213?v=4)](https://github.com/jamesrepository "jamesrepository (16 commits)")[![simonalcover](https://avatars.githubusercontent.com/u/17284664?v=4)](https://github.com/simonalcover "simonalcover (11 commits)")[![jun1432](https://avatars.githubusercontent.com/u/26325630?v=4)](https://github.com/jun1432 "jun1432 (7 commits)")[![jpardillo](https://avatars.githubusercontent.com/u/40847547?v=4)](https://github.com/jpardillo "jpardillo (2 commits)")[![nicole-cayambas](https://avatars.githubusercontent.com/u/55810654?v=4)](https://github.com/nicole-cayambas "nicole-cayambas (2 commits)")

---

Tags

cmsmodulezf2melis

### Embed Badge

![Health badge](/badges/melisplatform-melis-front/health.svg)

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

###  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)
