https://github.com/flydev-fr/processgeneralsettings
https://github.com/flydev-fr/processgeneralsettings
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/flydev-fr/processgeneralsettings
- Owner: flydev-fr
- Created: 2016-08-27T19:06:45.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-11-08T21:15:26.000Z (over 5 years ago)
- Last Synced: 2025-04-15T02:52:43.582Z (about 1 year ago)
- Language: JavaScript
- Size: 31.3 KB
- Stars: 8
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Global settings for ProcessWire 2.7+
This module provides a solution for keeping general site settings in one place
## Features
- Admin can create unlimited number of settings
- Settings can be grouped
- Admin can set setting label, notes, property name, field width and type
- Settings can be of type text, checkbox, radios, select, email, url, integer
- The output can be language aware
## How to use
In module configuration create as many settings as needed. Customize their label, type, width
and provide a name you want to use in a template files (property name).
Every time you wish to output site name you can use `$settings->site_name` or `wire('settings')->site_name`
You can change global name (`$settings`) to something else in module configuration.
To get basic markup with all settings and their values use $settings->render().
## Requirements
This version of the module requires ProcessWire 2.7+
## Multilanguage
To make fields multilanguage aware create a field with a same property name with '\_languageName' appended.
Example: Your site has two languages: _default_ and _french_, create _site_title_ and _site_title_french_ fields.
Put in a template `$settings->site_title`. If a user has set french language, this module output _site_title_french_,
otherwise _site_title_.
---
Copyright 2016 by Piotr Markiewicz