Implement customizable binary filenames without TCM URI #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhanced flexibility for generating binary filenames, specifically addressing the need to exclude the TCM URI for certain schemas, such as PDF downloads.
The necessity for this enhancement stems from user feedback indicating that the default behavior of appending the TCM URI to the binary filenames is not practical for documents intended for download and local storage. Clean and concise filenames are particularly sought after for PDF documents.
Enhancements have been introduced in the DefaultModelBuilder and DataModelBuilder classes to facilitate this requirement. These include conditional logic that omits the TCM URI from the filename when the RenderedItem.AddBinary method is called. The method's overloads, which allow specifying a custom filename, are employed for schemas that have been configured to exclude the TCM URI.
This new functionality ensures a more user-friendly experience and grants content managers the flexibility to define clean filenames for specific schemas. The implementation is designed to be backward compatible, preserving the default behavior for all schemas that do not necessitate a deviation from the standard naming convention.
Key Changes: