Skip to content

Conversation

@nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Dec 17, 2025

Proposed Changes

This pull request introduces a new mechanism for rendering custom fields and previews in the dotCMS UI, enabling support for both the new and legacy edit modes. It modularizes the code by splitting custom field logic and preview code into separate files for new and old modes, and introduces a new SCSS file for consistent field styling in the Angular app. The changes also improve maintainability and future extensibility by isolating mode-specific logic.

Support for new and legacy edit modes:

  • Updated Velocity templates (cachettl_custom_field.vtl, og_preview.vtl, template_custom_field.vtl) to conditionally include either new or old implementations based on whether the new edit mode is enabled. This allows seamless toggling between modern and legacy UI logic. [1] [2] [3]
  • Added new files for the new edit mode (cachettl_custom_field_new.vtl, og_preview_new.vtl) and old edit mode (cachettl_custom_field_old.vtl, og_preview_old.vtl), separating modern JavaScript/HTML from legacy Dojo-based implementations. [1] [2] [3] [4]

UI/UX and styling improvements:

  • Introduced a new SCSS file (native-field.component.scss) for consistent, modern styling of native form fields (inputs, selects, textareas, and buttons) in the Angular app, and registered it in the component. [1] [2]

These changes improve code organization, maintainability, and the user experience for both new and legacy edit modes.

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

** any additional useful context or info **

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

This PR fixes: #34029

…dit mode support

- Updated the title custom field template to support a new edit mode using the `DotCustomFieldApi`.
- Implemented event listeners for the title box to automatically update the URL and friendly name fields based on the title input.
- Improved code structure by separating logic for new edit mode and legacy Dojo implementation.
- Ensured backward compatibility by maintaining the original script for non-edit mode scenarios.

This change enhances user experience by providing real-time updates and a more modern approach to handling custom fields.
…:dotCMS/core into 34029-task-migrate-pages-vtls-to-new-api
…:dotCMS/core into 34029-task-migrate-pages-vtls-to-new-api
@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Dec 17, 2025

Meticulous was unable to execute a test run for this PR because the most recent commit is associated with multiple PRs. To execute a test run, please try pushing up a new commit that is only associated with this PR.

Last updated for commit 13bb7af. This comment will update as new commits are pushed.

@mergify
Copy link

mergify bot commented Dec 17, 2025

⚠️ The sha of the head commit of this PR conflicts with #34106. Mergify cannot evaluate rules on this PR. ⚠️

@mergify mergify bot mentioned this pull request Dec 17, 2025
3 tasks
@nicobytes nicobytes closed this Dec 18, 2025
@nicobytes nicobytes deleted the 34029-redirect-url-vtl branch December 18, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Migrate "Pages" VTLs to new API

2 participants