4 users online. Create an account or sign in to join them.Users
Site Preferences
This is an open discussion with 4 replies, filed under Extensions.
Search
Site preferences offer a way to manage custom front-end settings in the backend. You define all settings in a separate configuration file inside your workspace, preferences.site.php. This way all preferences can be tracked with Git in case you share your workspace with co-workers.
Site preferences allow the creation of multiple fieldsets shown on the preference page in the backend. Each fieldset can contain multiple instances of the following field types:
- input fields,
- text areas,
- select boxes,
- checkboxes and
- help texts
The extension will return all settings as parameters on the front-end.
Default Configuration:
<?php
$settings = array(
###### FIELDSET: SITE PREFERENCES ######
array(
'name' => 'Site Preferences',
'fields' => array(
array(
'name' => 'textarea',
'label' => 'This is a textarea',
'type' => 'textarea',
'value' => '',
),
array(
'name' => 'input',
'label' => 'This is an input field',
'type' => 'input',
'value' => '',
),
array(
'name' => 'selectbox',
'label' => 'Select something',
'type' => 'select',
'values' => 'this, is, a, selection, list',
'value' => '',
),
)
),
########
###### FIELDSET: MORE PREFERENCES ######
array(
'name' => 'More preferences',
'fields' => array(
array(
'type' => 'help',
'value' => 'This is just another group of settings added to the preference page. You can edit all fields and fieldset in the <code>preferences.site.php</code> file inside your <code>workspace</code>.',
),
array(
'name' => 'checkbox',
'label' => 'Yes, I've read that!',
'type' => 'checkbox',
'value' => 'checked',
),
)
),
########
);
Example Parameter output
$sp-site-preferences-textarea
$sp-site-preferences-input
$sp-site-preferences-selectbox
$sp-more-preferences-checkbox
<params>
<sp-site-preferences-textarea />
<sp-site-preferences-input />
<sp-site-preferences-selectbox />
<sp-more-preferences-checkbox>Yes</sp-more-preferences-checkbox>
</params>
Site Preferences updated to version 1.0.1 on 17th of January 2012
Thanks, hana+nils. This looks like it will be very useful.
Just a quick note: For the Repository URL on the Site Preferences extension page, I think it would be better to have the URL to the GitHub page than the git clone URL.
Thanks, Stephen. I just changed the URL.
Create an account or sign in to comment.
A new extension, "Site Preferences" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.