Introduction
Extended functionality for GS Components: better UI with sort & search, CodeMirror support, doubleclick code snippet copy, individual component save without page reload. Components Extended saves your components as <slug>.xml files in data/components with AJAX, one component at a time (no page reload!). It replaces the components tab with a custom tab, and will automatically import existing components from
Components Extension adds one PHP function for components,
Eg if you had the following:
In your extended component you could do:
And it would output: 'Hello world!'.
Features
Be sure to set the GSTIMEZONE constant to your timezone if you wish to have meaningful timestamps for created & modified dates.
NB: to other plugin developers; the standard GS hooks
Screenshot
Extended functionality for GS Components: better UI with sort & search, CodeMirror support, doubleclick code snippet copy, individual component save without page reload. Components Extended saves your components as <slug>.xml files in data/components with AJAX, one component at a time (no page reload!). It replaces the components tab with a custom tab, and will automatically import existing components from
components.xml
on activation. Available in EN, FR, NL. Download it from Extend.Components Extension adds one PHP function for components,
get_ext_component($slug, $params = array());
where $params
is an array of named keys (or an object).Eg if you had the following:
PHP Code:
<?php get_ext_component($slug, array(
'greet' => 'Hello',
'name' => 'world'
)); ?>
PHP Code:
<?php echo $params->greet . ' ' . $params->name . '!'; ?>
And it would output: 'Hello world!'.
Features
- Single-file components saved in data/components, modify 1 component at a time, smaller request payload.
- Cleaner UI
- Rename the component title independently from its slug.
- Keeps track of the created date, modified date, and last editor.
- Replaces the component tag cloud with an autofill search + sort (by [reverse] alphabetical)
- One extra PHP function:
<?php get_ext_component($slug, $params = array()); ?>
- Bonus: doubleclick the get_component snippet for automatic copy to clipboard
Be sure to set the GSTIMEZONE constant to your timezone if you wish to have meaningful timestamps for created & modified dates.
NB: to other plugin developers; the standard GS hooks
component-save
and component-extras
also work with this plugin.Screenshot