Skip to content
Back to skills

Create Position Column

ASecurity

Documents how to add drag-and-drop row reordering to a PrestaShop grid. Requires a PositionColumn in the definition, a dedicated update-position route, and position handling in the repository.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 29, 2026
ai-agents

Security analysis

A100/100

Scanned May 29, 2026

npx -y skills add jeffsenso/prestashop-skills --skill create-position-column --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Position Column?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create Position Column
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jeffsenso-create-position-column/badge)](https://www.skillsdirectory.com/skills/jeffsenso-create-position-column)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-position-column
description: >
  Documents how to add drag-and-drop row reordering to a PrestaShop grid.
  Requires a PositionColumn in the definition, a dedicated update-position
  route, and position handling in the repository.
needs: [create-grid-definition, create-admin-routing]
produces: "PositionColumn configuration and position-update route wiring"
conditional: "only for entities with position/sort support"
---

# create-position-column

## Instructions

1. Add `PositionColumn` as the second column (after BulkActionColumn) in the Grid Definition.
2. Configure the position update route: `->setOption('update_method', 'POST')->setOption('update_route', 'admin_{domain}s_update_position')`.
3. Create the `admin_{domain}s_update_position` POST route in the routing YAML (see `create-admin-routing` skill).
4. In the controller, handle the AJAX position update: receive `positions[]` array, dispatch `UpdatePosition{Domain}Command` (or use QueryBuilder directly).
5. In the repository, update the `position` column for the moved entities.

## Rules

Column ordering conventions (PositionColumn as second column) are in [Grid/CONTEXT.md](../../CONTEXT.md#column-definitions). Skill-specific reminders:

- Position updates are always AJAX — return JSON response, not redirect
- Position values start at 0 or 1 — be consistent with existing PS convention

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.