Skip to content

Conversation

@cmiqueo
Copy link
Contributor

@cmiqueo cmiqueo commented Dec 10, 2025

Summary
This PR introduces support for a new categoryMappings field within the Milo JSON configuration. The goal is to provide more flexible and granular control over category-to-template mappings without requiring code changes.

Screenshot 2025-12-09 at 5 50 15 PM

What’s Changed
Added categoryMappings support in the CaaS Collection Configurator.
Updated logic to read category mapping rules from JSON instead of relying on hard-coded behavior.
Ensured backward compatibility when categoryMappings is absent.
Minor cleanup and structural alignment with existing config parsing.

Why This Is Needed
Some page types require custom category logic that cannot currently be expressed through the existing config. Allowing mappings to be defined in milo.json gives authors and integrators more control while reducing engineering overhead.

How It Works
The JSON config may now include a categoryMappings array.
Each mapping defines a category key and the corresponding template or behavior.
If categoryMappings is not provided, the system falls back to default behavior.

Testing
Verified that pages load expected templates when categoryMappings is present.
Confirmed that existing pages behave unchanged when the field is omitted.
Manually tested with multiple mapping configurations to verify precedence and fallback logic.
Resolves: MWPW-185006

Test URLs:

@aem-code-sync
Copy link
Contributor

aem-code-sync bot commented Dec 10, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@cmiqueo cmiqueo added caas-configurator CaaS Configurator CaaS CaaS related code trivial PR doesn't require E2E testing by a reviewer labels Dec 10, 2025
@github-actions
Copy link
Contributor

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

@cmiqueo cmiqueo added Ready for Stage and removed trivial PR doesn't require E2E testing by a reviewer labels Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CaaS CaaS related code caas-configurator CaaS Configurator Ready for Stage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants