FUEL CMS User Guide : Version 1.5.2

Inline Editing

Inline editing allows users to quickly modify module information within the context of the website. This is accomplished by using either the fuel_edit or the fuel_var function with the latter specific to pages that are completely editable (and not just module data).

fuel_var example

// short version

// with default value
<?=fuel_var('myvarname', 'Default Value Goes Here')?>

// with default value and turns off the inline editing
<?=fuel_var('myvarname', 'Default Value Goes Here', FALSE)?>

fuel_edit example

// short version

// long version
<?=fuel_edit($article->id, 'Edit article: '.$article->title, 'articles', TRUE, 10, 10)?>

// with create
<?=fuel_edit('create', 'Create', 'articles')?>

// with create and initialization values
<?=fuel_edit('create|author_id=1', 'Create', 'articles')?>

For inline editing to work, you must be logged into FUEL and have the proper permissions to edit the page or module information. A pencil icon will appear over editable areas when the editing for the page is toggled on. Clicking on the icon will overlay a form over your page to edit the values in context.

Page Inline Editing

Page inline editing allows you to edit the values of variables used in the page. A FUEL logo will be displayed in the upper right area of the page that can slide out and provide you the ability to toggle inline editing, publish status and caching. Clicking the inline editing pencil will toggle inline editing on.

Module Inline Editing

For those pages that may not be editable, you can still allow for module data to be edited (e.g. news items). The top right area will not have the controls for page publish status, caching or layouts and will look like the following:

Clicking the pencil will reveal the form to edit the module information.

Disabling Inline Editing

To disable inline editing for a static view file, set the "FUELIFY" constant to FALSE in your view file like so:

<?php define('FUELIFY', FALSE); ?>