This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I'm really interested in getting started with the new "reordering of lists" feature that was checked into Github yesterday. When I updated my October using "composer update", sure enough, the files involved with reordering are now included with October. I have a client site that goes live in a week, and it would be great to have the ability to reorder records. Is there a "quick start" guide available?
Thanks for the update! Bret
To partially answer my own question, the documentation is here: https://octobercms.com/docs/backend/reorder
Follow up question: Where's an example reorder toolbar partial? I'm referring to this section in the Reorder Behavior Config file:
# Toolbar widget configuration
toolbar:
# Partial for toolbar buttons
buttons: reorder_toolbar <=== and this should contain?
Thanks! Bret
I've posted this question to Stack Overflow in hopes to get an answer: http://stackoverflow.com/questions/32341621/october-cms-sorting-records-example-of-the-partial-for-the-toolbar-icons
An example for the toolbar can be found here: https://octobercms.com/docs/backend/lists#adding-toolbar
Thanks for the link, Alxy. I'm unfortunately still having issues. I added the following toolbar partial (named _reorder_toolbar.htm):
<div data-control="toolbar">
<a
href="<?= Backend::url('btruchan/team/members/create') ?>"
class="btn btn-primary oc-icon-plus">
New Team Member
</a>
<button
class="btn btn-default oc-icon-trash-o"
disabled="disabled"
onclick="$(this).data('request-data', {
checked: $('.control-list').listWidget('getChecked')
})"
data-request="onDelete"
data-request-confirm="Delete Team Member: Are you sure?"
data-trigger-action="enable"
data-trigger=".control-list input[type=checkbox]"
data-trigger-condition="checked"
data-request-success="$(this).prop('disabled', false)"
data-stripe-load-indicator>
Delete
</button>
</div>
And the error that I'm getting is:
Undefined variable: reorderToolbarWidget
/var/www/terrasearch/public/modules/backend/Behaviors/reordercontroller/partials/_container.htm line 1
The code it's referring to is:
<?php if ($reorderToolbarWidget): ?>
<!-- Reorder Toolbar -->
<div id="<?= $this->getId('reorderToolbar') ?>" class="reorder-toolbar">
<?= $reorderToolbarWidget->render() ?>
</div>
<?php endif ?>
<!-- Reorder List -->
<?= Form::open() ?>
<div
id="reorderTreeList"
class="control-treelist"
data-control="treelist"
I've tried to trace this error down. It seems like, in \public\modules\backend\behaviors\ReorderController.php, the reorder() function is not being called, which means that the prepareVars() function is also not being called. This prevents the following code from being executed:
$this->vars['reorderToolbarWidget'] = $this->toolbarWidget;
ReorderController.php::makeToolbarWidget() is being called and seems to be OK. I've checked $this->toolbarWidget, and it seems to contain perfectly good data. (It isn't NULL).
Any help would be much appreciated.
Last updated
1-6 of 6