How to customize Content Manager Web UI properly?

Hello All,

I have some questions about customizing the Content Manager web UI (v13 SP2). We used to do this by editing OOTB ASP files. These customizations include: removing certain buttons (like new version or new branch) from top/version/language button bars based on user role, adding custom javaScript field validations, adding or removing fields from Create/Update dialogues. This proved to be really cumbersome, because with each upgrade we had to re-implement these changes if the particular ASP file was changed in the next version.
I am currently experimenting with the MetadataConfig.xml approach, but unfortunately it does not seem to cover everything that we need.

  • Is there another, less "hacky" way to implement such changes on the web UI?

I would appreciate any guidance in the matter. Thank You in advance!

  • Hi Gergo,

    Along the way - final straight on releasing 14SP2 now - we moved a lot out of the mixed files (meaning layout, business logic, security/pentesting, configuration in one ClassicAsp file) into configuration. The things you mention like buttons (new version, etc) were already in xml configuration files from the start.

    Furthermore, historically, it is not because it was "a text file" (like classic *.asp) that it was always considered an extension point moving into different technology, UX paradigms, etc

    So my ask, if I may, is describe the use case of what you are trying to achieve?

    1. So you write "custom javaScript field validations" ... can you describe what kind of validation you are missing?
    2. You wrote "adding or removing fields from Create/Update dialogues", this can be done over metadataconfig.xml and can be controlled across new/newversion/update dimension, application (like client tools or web client etc) through ishconditions

    So in short, what do you need exactly? And preferably you post these on the Community Ideas section so you can get your peers to enrich and confirm your ideas.

    Truly appreciated,
    Dave

  • Hello Dave,

    I did realize my question was not well formed, sorry. I figured out most configurations since then. Thank you for pointing them out.

    The thing I need help with is scripting custom field validations for both Publication Manager and Content Manager in MetadaConfig.xml.
    The custom field is implemented in MetadaConfig.xml. If the value is not accepted an exception is raised. For testing I removed the actual validation (it works as expected in Publication manager):
    Screenshot of MetadaConfig.xml code with a custom field validation script for Trados Studio, showing an exception being raised without actual validation.

    The field does show up on Create/Update dialogues properly in both clients. However, the script block only seems to be executed in the Publication Manager, where the exception triggers a pop-up. I expected a similar behavior in the web client, but upon submitting the form, nothing happened. More importantly, the object in question was created, despite the validation failed(?). Throwing an exception during validation has different meaning in these clients? Or I'm just missing something?

    Either way, how can I add shared validation for this field in both clients? The desired behavior would be to raise an alert upon failed validation -and obviously not create an object with invalid metadata.

    Thank You in advance,
    Gergő

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 6:39 AM (GMT 0) on 5 Mar 2024]
  • Hi Grego,

    The webclient is not able to utilize the same script block nor the validation routine offered by the script block.

    The better and more save principle would be to transform this validation routine towards an IWritePlugin which would be executed upon each and every create/update request you make towards the repository.
    These create/update requests could be triggered by either the Publication Manager, the webclient dialogs, the API layer (your own written application) and/or any ISHRemote based script.

    The behavior will be slightly different as the validation is only done after you click the OK button and it is done on the server, but it will do what you envision it to do.
    It will run the validation and if not valid, it will throw the expected exception which will be shown in the UI of Publication Manager and Webclient.
    The object is not created.

    You can find more information on the IWritePlugin mechanism in the following location on the Docs portal of SDL:

    Write Plugins: docs.sdl.com/.../GUID-EB600EC5-B009-4643-8520-A3AAA2CD0D44

    Kind Regards,


    Raf

  • Hello Raf,

    Thank you for your reply. I am familiar with write plugins, in fact we have a couple of them in place already. However, for Create/Update dialogues we would prefer client side validation. Currently we achieve this with custom javaScript code in RepTopDlg.asp\RepVersionDlg.asp\RepLngDlg.asp.

    My goal was to move these validations into MetadataConfig.xml using script blocks for the affected dialog fields. I made my assumption based on the documentation. Is it not possible for the webclient to utilize the script blocks at all? If not, is there any other way to achieve client side validation for Create\Update dialog fields? 

    As a side note, I would need relatively complex validation, like using regular expressions and checking if the introduced value is a file name.

    Thank You in advance!

    Regards,
    Gergő