Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement customizable binary filenames without TCM URI #56

Merged
merged 1 commit into from
May 31, 2024

Conversation

svb-wks
Copy link

@svb-wks svb-wks commented Nov 6, 2023

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.

…binary Url for the configured schema(s) via parameter
@dxasupport dxasupport merged commit 6adae59 into RWS:develop May 31, 2024
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.

None yet

2 participants