Download the PHP package melisplatform/melis-front without Composer
On this page you can find all versions of the php package melisplatform/melis-front. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download melisplatform/melis-front
More information about melisplatform/melis-front
Files in melisplatform/melis-front
Package melis-front
Short Description Melis Platform front module
License OSL-3.0
Homepage https://github.com/melisplatform/melis-front
Informations about the package 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
These instructions will get you a copy of the project up and running on your machine.
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
Run the composer command:
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
See Full documentation on implementing a website here
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 -
MelisFrontMenuPlugin
This plugin is made to generate menu for websites.
File: /melis-front/src/Controller/Plugin/MelisFrontMenuPlugin.php -
MelisFrontBreadcrumbPlugin
This plugin is made to generate a breadcrumb for websites. File: /melis-front/src/Controller/Plugin/MelisFrontBreadcrumbPlugin.php -
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 -
MelisFrontSearchResultsPlugin
This plugin is made to display the search results based on ZEnd_Search.
File: /melis-front/src/Controller/Plugin/MelisFrontSearchResultsPlugin.php - MelisFrontDragDropZonePlugin
This plugin must be called through the use of its helper: MelisDragDropZoneHelper.
File: /melis-front/src/View/Helper/MelisDragDropZoneHelper.php
See Full documentation on templating plugins here
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.Parameter Type Description key String Key of the config. pageId Int Used determine the site id, name, and language and on where to get the config section String/Int The section on where to get the config or site Id language String Language on which to get the config To call the service.
To get a specific
key
of the current site and the language of the page with id 1But 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.
We can also get a particular
key
from another site by using thesite Id
.There is also a different section apart from sites. Currently, we have two sections which are sites and allSites.
-
-
MelisSiteTranslationService
Provides services to translate text and list all site translations
File:/melis-front/src/Service/MelisSiteTranslationService.php
getText(translationKey, langId, siteId)
.
Parameter Type Description translationKey String Key of the translation. langId Int An identifier on which language to get the translation siteId Int An identifier on which site to get the translation To call the service.
To get a particular translation, You need to specify the translation key along with the lang id and site id.
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 -
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
-
MelisDragDropZoneHelper
File: /melis-front/src/View/Helper/MelisDragDropZoneHelper.php -
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)
Parameter Type Description key String Key of the config. section String/Int The section on where to get the config or site Id language String Language on which to get the config To call the helper.
To get a
specific key
from the config for thecurrent site
.But what if we wanted to get the
key
from anotherlanguage
of thecurrent site
? We can achieve this by defining thelanguage
on where to get theconfig
.We can also get a particular
key
from another site by using thesite Id
.There is also a different
section
apart fromsites
. Currently, we have two sections which aresites
andallSites
. -
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)
Parameter Type Description translationKey String Key of the translation. langId Int An identifier on which language to get the translation siteId Int An identifier on which site to get the translation To call the helper method.
To get a particular translation, You need to specify the translation key along with the lang id and site id.
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
- Melis Technology - www.melistechnology.com
See also the list of contributors who participated in this project.
License
This project is licensed under the OSL-3.0 License - see the LICENSE.md file for details
All versions of melis-front with dependencies
laminas/laminas-navigation Version 2.19
laminas/laminas-serializer Version 2.17
laminas/laminas-file Version ^2.13
matthiasmullie/minify Version ^1.3
melisplatform/melis-core Version ^5.2