/project/plugins/site
/project/plugins/site
Key | Value | Description |
---|---|---|
enabled | true | true or false to disable the plugin |
Variable | Description |
---|---|
entry | The entry object with all the information about the current page you are currently on. |
query | The Query Params |
uri | The URI string |
Examples:
{{ entry.title }} {# returns the current entry title #}
/project/themes/
/project/config/settings.yaml
and update theme
setting with your theme name.You can easily access theme configuration and theme information from your Twig and PHP files.
Information from the currently active theme can get from the registry
object.
Example information from /project/themes/noir/theme.yaml
name: Noir
version: 1.0.0
description: Noir theme for Flextype
author:
name: Sergey Romanenko
email: sergey.romanenko@flextype.org
url: https://flextype.org
homepage: https://github.com/flextype-themes/noir
bugs: https://github.com/flextype-themes/noir/issues
license: MIT
You can reach any of these items via registry themes
by using the standard dot-syntax:
Usage:
Theme name: {{ flextype.registry.get('themes.noir.manifest.name') }}
Theme version: {{ flextype.registry.get('themes.noir.manifest.version') }}
Result:
Theme name: Noir
Theme version: 1.0.0
You can also reach these same values from a Flextype theme(s) with PHP syntax:
Usage:
$theme_name = flextype('registry')->get('themes.noir.manifest.name');
$theme_version = flextype('registry')->get('themes.noir.manifest.version');
Themes have default and project configuration files, named settings.yaml
located in /project/themes/<themename>/
and in /project/config/themes/<themename>/
For example, let us consider the Noir theme and there is a file called settings.yaml
in the themes site settings folder. The contents of this configuration file look like this:
enabled: true
Let us add some custom theme settings.
Open /project/config/themes/noir/settings.yaml
and add new variable with value highlight: red
enabled: true
highlight: red
Then in your theme templates you can access these variable using the themes.noir
object:
<h1 style="color:{{ flextype.registry.get('themes.noir.settings.highlight') }}">
BUILD FAST, FLEXIBLE, EASIER TO MANAGE WEBSITES WITH FLEXTYPE.
</h1>
Result:
In PHP you can access the current theme configuration like this:
$highlight = flextype('registry')->get('themes.noir.settings.highlight');
Themes Admin plugin to manage site themes for the website frontend.
Contact Plugin for Flextype.
ACL Panel plugin for Flextype.
Data Guard plugin protects your website from the content copying.
Accounts Panel plugin for Flextype.
Form Plugin to render user forms for Flextype.