Hello, I am trying to think through a requirement I have.
We want the ability to change/verify the name of a new document a user creates in the interface, actually more to the point, the URL field that is being shown to the user as they enter the name. This is so we can control the name of the document against our own SEO rules. These rules differ from the encoder class that is being used now.
I know the logic behind that field is actually using the logic found here: Node name encoding - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS
I am thinking this could be achieved in two ways, but not sure it makes sense to do it one way or the other:
- Override the UriEncoding class in such a way that it calls an external rest service that will take in the current filename and return the cleansed/standardized representation.
- Using the Workflow Event process, on a document creation event, I make the same rest service call and modify the URI of the document within the repository at that point.
Does anyone have any other ideas? Or does anyone see any issues with the two approaches above? Any preferences?