Skip to content

Instantly share code, notes, and snippets.

@ChrisFrench
Created December 19, 2014 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisFrench/e041583a40b84429fe7e to your computer and use it in GitHub Desktop.
Save ChrisFrench/e041583a40b84429fe7e to your computer and use it in GitHub Desktop.
xeditableexample.php
<?php $publishStates = array(array('value' => 'draft', 'text' => 'draft'), array('value' => 'unpublished', 'text' => 'unpublished'), array('value' => 'published', 'text' => 'published')) ;
<?php foreach($paginated->items as $item) { ?>
<?php $xEditable = new \Dsc\Html\xEditable($item, '/admin/pages/page/edit/inline'); ?>
<?php echo $xEditable->field('title'); ?>
<?php echo $xEditable->field('slug'); ?>
<?php echo $xEditable->field('any.deep.value'); ?>
<?php echo $xEditable->field('any.deep.value'); ?>
<?php echo $xEditable->select('publication.status', $item->{'publication.status'}, $publishStates ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment