Is it possible to import files into Tridion without changing the title?

I want to replace UI elements (uicontrol and wintitle) with variables. I have a topic with a title "<wintitle>BPC Options</wintitle> Dialog". See BPC Options Dialog-no-variable=GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=4=EN=.xml. Its title in the database is "BPC Options Dialog". I downloaded the file and replaced the "BPC Options" with a variable with a script (I want to be able to process many files, so we created a script). See BPC Options Dialog-variable=GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=4=EN=.xml. Then I imported the file with Content Importer (Standard Import/Repository Content). See the image of the Content Importer. Then name of the topic in the database changes to "Dialog" (the variable is ignored). Is there a way to prevent the topic name from changing?

Screenshot showing a list of topics in Trados Studio with the topic name 'Dialog' selected, indicating the variable replacement issue. 

Screenshot of the Content Importer interface in Trados Studio with fields for import name, folder location, and metadata configuration.

<?xml version="1.0" encoding="UTF-16"?><!-- Created with XMetaL (http://www.xmetal.com) --><?ish ishref="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" version="4" lang="EN"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"[]>
<concept id="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" xml:lang="EN"><title id="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"><wintitle>BPC Options</wintitle> Dialog</title><conbody cid="1CQbI8"><p cid="183v4m">To open this dialog, open a sample in the <wintitle translate="no" varref="wi_explorer" /> workspace, and then click 
		<menucascade><uicontrol translate="no" varref="ui_show" /><uicontrol translate="no" varref="ui_base-peak-chrom_34600" /></menucascade>.</p><table id="TABLE_A8EC8E9E2C514EB3A93E4B27306E4511"><tgroup cols="2"><colspec colnum="1" colname="col1" colwidth="1.0*" /><colspec colnum="2" colname="col2" colwidth="4.0*" /><thead><row><entry colname="col1">Label</entry><entry colname="col2">Description</entry></row></thead><tbody><row><entry colname="col1"><uicontrol translate="no" varref="ui_mass-tolerance-_15245" /></entry><entry colname="col2"> Specify the required mass tolerance. This value is used to change the color of the trace in the plot each time the base peak mass changes by more than this value. The value does not affect the calculation.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_use-limited-mas_53822" /></entry><entry colname="col2"> Select this option to use the specified subset mass range. If this item is not selected, then the entire mass range that was acquired is used. Type a value in Da in the 
				  <uicontrol translate="no" varref="ui_start-mass" /> and 
				  <uicontrol translate="no" varref="ui_end-mass" /> mass fields.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_use-limited-tim_52793" /></entry><entry colname="col2"> Select this option to use the specified range. If this item is not selected, then the entire time range is used. Type a value in Da in the 
				  <uicontrol translate="no" varref="ui_start-mass" /> and 
				  <uicontrol translate="no" varref="ui_end-mass" /> fields.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_only-show-this-_13032" /></entry><entry colname="col2">Select to save these settings as the default settings. The dialog will only open if the user presses <uicontrol translate="no" varref="ui_shift" /> while clicking the menu option.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_all-overlaid" /></entry><entry colname="col2">Select to perform this task for all overlaid data sets.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_active-only" /></entry><entry colname="col2">Select to perform this task for the active data set only.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_ok" /></entry><entry colname="col2"><ph conref="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx#GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/ID-CLICK-OK" /></entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_cancel" /></entry><entry colname="col2"><ph conref="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx#GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/ID-CLICK-CANCEL" /></entry></row></tbody></tgroup></table></conbody></concept>
<?xml version="1.0" encoding="UTF-16"?><!-- Created with XMetaL (http://www.xmetal.com) --><?ish ishref="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" version="4" lang="EN"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"[]>
<concept id="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" xml:lang="EN"><title id="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"><wintitle translate="no" varref="wi_bpc-options" />Dialog</title><conbody cid="1CQbI8"><p cid="183v4m">To open this dialog, open a sample in the <wintitle translate="no" varref="wi_explorer" /> workspace, and then click 
		<menucascade><uicontrol translate="no" varref="ui_show" /><uicontrol translate="no" varref="ui_base-peak-chrom_34600" /></menucascade>.</p><table id="TABLE_A8EC8E9E2C514EB3A93E4B27306E4511"><tgroup cols="2"><colspec colnum="1" colname="col1" colwidth="1.0*" /><colspec colnum="2" colname="col2" colwidth="4.0*" /><thead><row><entry colname="col1">Label</entry><entry colname="col2">Description</entry></row></thead><tbody><row><entry colname="col1"><uicontrol translate="no" varref="ui_mass-tolerance-_15245" /></entry><entry colname="col2"> Specify the required mass tolerance. This value is used to change the color of the trace in the plot each time the base peak mass changes by more than this value. The value does not affect the calculation.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_use-limited-mas_53822" /></entry><entry colname="col2"> Select this option to use the specified subset mass range. If this item is not selected, then the entire mass range that was acquired is used. Type a value in Da in the 
				  <uicontrol translate="no" varref="ui_start-mass" /> and 
				  <uicontrol translate="no" varref="ui_end-mass" /> mass fields.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_use-limited-tim_52793" /></entry><entry colname="col2"> Select this option to use the specified range. If this item is not selected, then the entire time range is used. Type a value in Da in the 
				  <uicontrol translate="no" varref="ui_start-mass" /> and 
				  <uicontrol translate="no" varref="ui_end-mass" /> fields.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_only-show-this-_13032" /></entry><entry colname="col2">Select to save these settings as the default settings. The dialog will only open if the user presses <uicontrol translate="no" varref="ui_shift" /> while clicking the menu option.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_all-overlaid" /></entry><entry colname="col2">Select to perform this task for all overlaid data sets.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_active-only" /></entry><entry colname="col2">Select to perform this task for the active data set only.</entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_ok" /></entry><entry colname="col2"><ph conref="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx#GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/ID-CLICK-OK" /></entry></row><row><entry colname="col1"><uicontrol translate="no" varref="ui_cancel" /></entry><entry colname="col2"><ph conref="GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx#GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/ID-CLICK-CANCEL" /></entry></row></tbody></tgroup></table></conbody></concept>



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

    Varrefs are resolved only in the context of a Tridion Docs publication via a topic with a matching 'varid' attribute added to the publication's "Resources" folder. Content Importer operates outside of the context of a publication, so it has no means of correctly resolving a varref value. The varref attribute tells Tridion Docs to replace the contents of that element with the resolved value. In this case, since it cannot resolve the value, the element is retuned empty (as the self-closing <wintitle /> in your example), which is why it alters the previous value in your repository.

    - Josh

Reply
  • Hi Cobina,

    Varrefs are resolved only in the context of a Tridion Docs publication via a topic with a matching 'varid' attribute added to the publication's "Resources" folder. Content Importer operates outside of the context of a publication, so it has no means of correctly resolving a varref value. The varref attribute tells Tridion Docs to replace the contents of that element with the resolved value. In this case, since it cannot resolve the value, the element is retuned empty (as the self-closing <wintitle /> in your example), which is why it alters the previous value in your repository.

    - Josh

Children
No Data