PressRoom Documentation

Theming

In PressRoom you are able to set custom themes for each Editorial Project. This setting could be overwritten per each Edition in the Edition Meta tab.

Developing PressRoom themes is quick and easy since they inherit almost the same logic used for Wordpress Theme Development

File Structure

PressRoom themes resides inside the /pressroom/themes/ folder.

Themes are essentially made of a config.xml file and a set of layout files and assets (css, js, fonts, images, etc. ). Everything has been built for maximum flexibility, thus you are not forced to follow a specific folder structure to organize this content.

functions.php

Each PressRoom theme could use his own functions.php file. Place it wherever it makes sense for you, it will be automatically recognized.

config.xml

Defines Theme's metadata,layouts path and behaviour (rules).

Theme Metadata

  • uniqueid You awesome theme name namespace (lowercase) (required)
  • name Theme name (required)
  • date Theme creation date (required)
  • version Semantic versioning (http://semver.org/) (required)
  • description Theme description (optional)
  • thumbnail Theme thumbnail (required)
  • website Theme URI (optional)
  • author Theme Author (optional)

    • name Author fullname (optional)
    • email Author email (optional)
  • layouts wrap a list of layouts

  • item a single layout
    • name layout name. It'll be shown in the flatplan (required)
    • rule There are two kind of rules:
      • content A layout file used to render content items (post, pages, custom post types)
      • toc A layout files used to render the Table of Contents (required)
    • description A comment describing the layout unique features (optional)
    • path Layout file path. Can be anything below the theme folder (required)
<?xml version="1.0" encoding="UTF-8"?>
<theme>
    <uniqueid>starterr</uniqueid>
    <name>Starterr</name>
    <date>2015-08-05</date>
    <version>1.0.0</version>
    <description>Starterr is PressRoom Theme boilerplate.</description>
    <thumbnail>screenshot.png</thumbnail>
    <website>http://press-room.io/</website>
    <author>
        <name>thePrintLabs</name>
        <email>[email protected]</email>
    </author>
    <layouts>
        <item>
            <name>basic article</name>
            <rule>content</rule>
            <description>default article layout</description>
            <path>layouts/basic-article.php</path>
        </item>
        <item>
            <name>cover</name>
            <rule>content</rule>
            <description>Cover layout</description>
            <path>layouts/cover.php</path>
        </item>
        <item>
            <name>toc</name>
            <rule>toc</rule>
            <description>Table of Contents theme file</description>
            <path>layouts/toc.php</path>
        </item>
    </layouts>
</theme>

sample config.xml file from the Starterr theme

Important Notes:

  • You must use regular permalinks to let PressRoom correctly handle url rewritings.
  • Use the Flush theme cache option (PressRoom -> Settings) every time you move, delete or create new layout files.