Install
$ agentstack add skill-jeffsenso-prestashop-skills-create-twig-form-template ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
create-twig-form-template
Read @.ai/Component/Twig/CONTEXT.md for template conventions (layout, flash messages, routes, form themes).
1. Form template
Create src/PrestaShopBundle/Resources/views/Admin/{Section}/{Domain}/form.html.twig:
{% extends '@PrestaShop/Admin/layout.html.twig' %}
{% block content %}
{{ form_start(form) }}
{{ form_widget(form) }}
{{ 'Save'|trans({}, 'Admin.Actions') }}
{{ form_end(form) }}
{% endblock %}
- Always use a single
form_widget(form)— see [Twig/CONTEXT.md](../../CONTEXT.md) for why (module hook compatibility) - The same template typically serves both create and edit — the controller passes different form data
- For file uploads, add
enctype="multipart/form-data"(see CONTEXT.md)
Reference: src/PrestaShopBundle/Resources/views/Admin/Improve/International/Tax/ (simple), src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Manufacturer/ (with image)
2. Form theme overrides (only if needed)
When specific fields need custom rendering beyond Symfony defaults:
- Preferred: set the
form_themeoption directly on the form (PrestaShop custom option) — usually in the controller when building the form, or in the form type'sconfigureOptions(). Symfony picks up the theme automatically; no{% form_theme %}directive needed in the Twig file. - Fallback: use the Twig directive when the override is template-specific:
{% form_theme form 'Admin/{Section}/{Domain}/{domain}_theme.html.twig' %}
- Override the field block:
{% block _{field_id}_widget %}...{% endblock %} - Common case: image preview next to upload field with a "Remove" checkbox
Form themes are scoped to this form only — no global side effects.
3. JS asset inclusion
If the form needs JavaScript (for initComponents or Vue):
{% block javascripts %}
{{ parent() }}
{% endblock %}
The asset path must match the webpack entry name.
Rules
Conventions (layout, path(), single form_widget(form), NavigationTabType auto-rendering, file upload enctype, form theme block naming, JS asset inclusion) are in [Twig/CONTEXT.md](../../CONTEXT.md). Skill-specific reminders:
- Form theme overrides should be minimal — Symfony's default rendering handles most cases
- CSRF token is included automatically by
form_end(form)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: jeffsenso
- Source: jeffsenso/prestashop-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.