How skins are chosen

This section tries to explain how Nucleus chooses the skin to use when you request a page.

Skin Types

First of all, there are several skin types between which Nucleus makes a choice according to the request URL: see the list below. This should be very obvious.

Query String FormatWhich skin type?Which weblog is shown?
?itemid=..itemDeducted from itemid
?archive=..archiveDefault weblog, or blogid attribute
?archivelistarchivelistDefault weblog
?query=...searchDefault weblog, or blogid attribute
?imagepopup=..imagepopupNone (popup window with image)
(other or empty)indexDefault weblog, or blogid attribute

Next to these 7 types, there is an error type, which is used when errors occur.

The Skin Cascade

The table above also indicates how the blog to be displayed is chosen. The skin that will be used, is the default skin for that weblog, as selected in the settings for that weblog.

Not every skin needs to have definitions for all skin parts. When a part is missing, the skin called 'default' will be used instead (see below). This allows you for example to only create one error page and one member page.

The 'default' Skin

Nucleus requires that at all times there exists a skin called 'default'. This is the skin to which is backed up when a skinpart is missing. If the same skinpart is also missing from the 'default' skin, the error message 'no appropriate skin found' will be shown.

Another reason why the 'default' skin is required, is to be able to display error messages when no blog is selected (e.g. the 'no such blog' error)

Skins & Templates