I am creating a WFFM custom save action that works based on chosen EXM message. I have created an Action Editor dialog for my save action which should give the user to option to choose the EXM message from Sitecore content tree. I am trying to display the Sitecore content tree in a dropdown(similar to droptree in Sitecore) in my action editor dialog but unable to do it so far. The action editor is xaml based dialog and I need the possibility to filter the items being displayed in the dropdown(only specific template based items should be displayed in the dropdown).

I have tried using this:

 <DataContext runat="server" ID="CommandsDataContext" DataViewName="Master" ShowRoot="true" Root="{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}" />

            <TreePicker Width="75%" ID="MessageItem" runat="server" DataContext="CommandsDataContext" AllowDragging="false" SelectOnly="true" AllowNone="false"  Style="width:96%"/>

The above shows the control with a pre-selected path to /sitecore/content/home but the control do not show a dropdown on click.

I am using Sitecore 8.2 Update 2.

Please help.

  • Your code snippet seems correct and is working fine for me. I tested it in an existing action editor dialog xml using an existing ID for the Root attribute of the DataContext. The /sitecore/content/home path is the default path rendered in the TreePicker control if the ID of the Root data context attribute doesn't map to an existing Sitecore item. But even with a wrong ID, the TreePicker control should render a dropdown on click. Any error in the console of your browser? Feb 1 '21 at 3:48
  • @AlessandroFaniuolo There are no console errors. This works for me also if I try this with one of the xml action editor dialogs. But I am using the xaml based dialog which starts with something like this: <xamlControls xmlns:x="sitecore.net/xaml"> Feb 1 '21 at 8:07
  • Yes, it doesn't seem to work in a xaml based dialog. You might need to consider to build your dialog in xml instead. Feb 2 '21 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.