Manual:SkinMustache.php/fr

The SkinMustache class allows skin developers the flexibility to display the underlying data however they chose. A Mustache template is associated with the skin to be rendered and receives template data as described below.

To explore this more see Manual:How to make a MediaWiki skin.



Les template data
All data referenced here can be explored using the SkinJSON skin.

The Mustache skin associated with a skin receives the following data:



Menus (avec portlets / portals)
Pour la compatibilité arrière, plusieurs types de menus sont à prendre en compte lorsque vous faites un rendu via SkinMustache. Nous espérons qu'à l'avenir, un format standard de menu sera utilisé par tous.

PortletData
Menus (aka portlets/portals) in SkinMustache have a consistent data structure that looks like follows:

DataPortletsObject
The data-portlets object allows access to all the different menus that are available to render. Menus are organized into different buckets. A skin developer can choose to render each of these separately, to modify these buckets via the Manual:Hooks/SkinTemplateNavigation::Universal hook, or omit them. Each menu contains data consistent with data-portlets-sidebar.

DataHtmlObject
When dealing with this type, you are expected to create a container with id and class as attributes and html as its inner HTML. The container may contain other elements if you wish. The primary reason for the existence of this type, is you may want to render certain items as lists (`li` element) or blocks (`div` elements).

DataLogos
Note this data structure can be extended by extensions, and site configuration in LocalSettings.php

LogoObject
Note this data structure can be extended by extensions, and site configuration in LocalSettings.php