The theme.json File

The theme.json file contain about css links tags to use in inside head tag. This file are required for creating a theme.

Location

The location of this file is inside a theme directory.

app/
└── view/
 └── [THEME_NAME]/
  ├──  ...
  ├──  theme.json
  └──  ...

How It Works

The theme.json file processed by SENE_Controller class constructor and outputed by getAdditional().

Example Usage with JSON String

Here is the example codes for theme.json file using json string.

[
"<link rel=\"stylesheet\" href=\"{{base_url}}skin/front/css/nprogress.css\" />",
"<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css\" />",
"<link rel=\"stylesheet\" href=\"{{cdn_url}}assets/css/jquery.gritter.css\" />"
]
Example Usage with JSON Object

Here is the example codes for theme.json file using json object.

This method only supported from Seme Framework 4.0.2 above.

{
  "link":
  [
    {
      "rel": "stylesheet",
      "href": "https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css"
    },
    {
      "rel": "stylesheet",
      "href": "{{cdn_url}}assets/css/jquery.gritter.css"
    },
    {
      "rel": "stylesheet",
      "href": "{{base_url}}skin/v2/css/app.css"
    }
  ]
}

The {{cdn_url}} and {{base_url}} Keyword

theme.json support {{cdn_url}} and {{base_url}} keyword for replacing value from Seme Framework configuration.