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:
Conditional logic has been incorporated to manage TCM URI exclusion based on schema configuration.
RenderedItem.AddBinary method overloads are now leveraged for customizable filename output.
Provision of configuration options for schemas that require filenames without TCM URIs.
Comprehensive tests have been conducted to confirm that the new logic accurately generates filenames in both default and custom scenarios.
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: