What problem does it solve?
This Skill streamlines the creation of CFWheels view templates, ensuring proper query handling, correct form helper usage, and accurate association display. It prevents common view errors like query/array confusion and incorrect form helper usage, allowing you to build dynamic UIs efficiently.
Core Features & Use Cases
- View Template Generation: Creates index, show, and form views, layouts, and partials.
- Correct Data Display: Provides best practices for displaying associated data, handling query results, and checking for record counts.
- Form Helper Usage: Guides on using Wheels form helpers correctly, including
textField() with type attributes and displaying validation errors per field.
- Use Case: Generate an
index.cfm view for Posts that lists all posts, an _form.cfm partial for creating/editing posts with validation error display, and a main layout.cfm with flash messages and navigation. This ensures your UI is functional, user-friendly, and free of common CFML errors.
Quick Start
Example Index View:
<cfparam name="resources">
<cfif resources.recordCount>
<cfloop query="resources">
#linkTo(text=resources.title, action="show", key=resources.id)#
</cfloop>
<cfelse>
<p>No resources found.</p>
</cfif>