I need to access the dictionary from an XML file to display a message in the publish dialog of a Sitecore 8.2 instance. In the file sitecore\shell\Applications\MarketingAutomation\Controls\SelectList.xml
, I found this code:
<input id="search" type="text" class="jq_watermark" title="${Translate.Text(Texts.ENTER_SEARCH_CRITERIA)}"/>
so, in the file \Website\sitecore\shell\Override\Publish\Publish.xml
, I tried to emulate it file in this way:
...
<WizardFormPage ID="Settings" Header='${string.IsNullOrEmpty(WebUtil.GetQueryString("id")) ? Texts.PublishSite : Texts.PublishItem }'
Text='${string.IsNullOrEmpty(WebUtil.GetQueryString("id")) ? Texts.SelectTheRelevantPublishingSettingsForYourWebsite : Texts.SelectTheRelevantPublishingSettingsForTheItem }'>
<WizardFormPadding>
<p style="color: red; margin:25px 0px; font-size: 1.2rem;">${Translate.Text("PublishingWarning")}</p>
<Scrollbox ID="SettingsPane" Border="none" Background="transparent">
...
I also tried
... <p style="color: red; margin:25px 0px; font-size: 1.2rem;">@Sitecore.Globalization.Translate.Text('PublishingWarning')</p> ...
I was sure to add the Dictionary item in /sitecore/system/Dictionary
.
What comes out on the pop up is the literal text in a red font (because of the styling of the p tag), rather than the value of the dictionary item:
${Translate.Text("PublishingWarning")}
/sitecore/system/Dictionary
folder?