Skin Module

Last modified by Eleni Cojocariu on 2026/09/23 12:16

Explanation

The Skin Module is the API Java code uses to find a file inside a skin, following the skin's inheritance. It has nothing to say about how a skin looks.

The entry point is the SkinManager component, which hands out a Skin by id, for the current request or for the instance default. A Skin is a ResourceRepository, so it has a parent and resolves a name to a Resource. Every member of the four roles is listed on the Skin API. The artifact is xwiki-platform-skin-api, whose sources are in http://www.github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-api.

The three kinds of skin each resolve to a class: an id that resolves to an existing page gives a WikiSkin, whose XWiki.XWikiSkins object holds the skin's properties; a skins/ folder of the environment holding a skin.properties gives an EnvironmentSkin; anything else falls back to a ClassLoaderSkin, which is how a skin shipped inside a JAR is found. A wiki skin reads a file from a template override object, then from a property of its skin object, then from an attachment of the same page.

A lookup starts in the skin itself and then walks the parent chain, and the first repository holding the name wins. A skin that names no parent falls back to the default parent skin. Only a filesystem or JAR skin can opt out of that fallback, by setting an empty parent in its skin.properties; a wiki skin whose baseskin is left empty still gets the default parent.

This module declares the roles and nothing else, and ships no components.txt. The implementations are in xwiki-platform-oldcore, package com.xpn.xwiki.internal.skin, which is where to read how a lookup behaves.

Skin extensions are a different mechanism, how a page contributes CSS or JavaScript to the response; they are documented on Skin Extension Plugin. Only their two roles are declared in this artifact.

FAQ

Does this API change a skin?

No, it only reads. A skin is edited from the administration, not through these roles.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Related

Get Connected