Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jesse Andrews 191 posts 716 karma points c-trib
    Jan 09, 2019 @ 02:47
    Jesse Andrews
    0

    What is the alias that should be used for mappers that are applied to grid editors?

    JumooTranslationManager: v2.1.5

    I've been able to successfully map content for custom data types, but I'm having trouble getting it to trigger for a custom grid editor I built. I found documentation here about what the alias should be, but the example seems to be missing, so I'm not sure what folder I should be referencing. Here is the relevant excerpt from the document.

    When looking for custom editors within the Grid property editor, translation manager will the folder the view is stored in, so for example if your grid editor contains the following config : [config] The editor alias for translation manager will be [alias] - which is the folder name, this is the name you should use for all configuration and custom value mappers.

    Currently I've set the value of the Editors array to the alias of the editor in grid.editors.config.js ("tabs"). The current render path is "/App_Plugins/Tabs/Views/Tabs.cshtml" What am I missing?

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Jan 09, 2019 @ 12:24
    Kevin Jump
    0

    Hi Jesse,

    Yeah sorry that document needs cleaning up a bit doesn't it.

    if the tabs editor has custom values in it.

      <grid>
        <custom>
          <config alias="Tabs">
            <properties>
              <property name="property1" alias="Umbraco.Textbox" />
              <property name="property2" alias="Umbraco.TinyMCEv3" />
            </properties>
          </config>
        </custom>
      </grid>
    

    if the whole thing is just text, then you can put it in the <text> section but it needs to be prefixed with Umbraco.Grid (to prevent clashes with other property editors) - eg.

      <text>
        <text>Umbraco.Grid.Tabs</text>
        <html>Umbraco.Grid.Tabs</html>
      </text>
    

    if that doesn't seem to work - turning on debugging for translation manager in log4net.config will add entries to the log that will tell you what the name of mappers we are looking for are :

      <logger name="TranslationManager">
        <level value="DEBUG" />
      </logger>
    

    Then you should see entries for ValueMapperFactory that say the name of the mapper TM is looking for.

    Hope that helps.

  • Jesse Andrews 191 posts 716 karma points c-trib
    Jan 09, 2019 @ 18:11
    Jesse Andrews
    0

    Thanks for the quick response Kevin. That should get me unstuck.

  • Jesse Andrews 191 posts 716 karma points c-trib
    Jan 09, 2019 @ 21:07
    Jesse Andrews
    100

    I was able get it pick up on the mapper I wrote. The "Umbraco.Grid.Tabs" was a step in the right direction, but my tabs had the view "/App_Plugins/Accordion/backoffice/accordion.html" (tabs and accordion in my build share backoffice controls, since they have the same data structure) so it was looking for Umbraco.Grid.Accordion instead. An example in the block I quoted earlier should clear that up for future uses, though it would be a bit clearer if it used the alias instead of extracting it from the view. I assume there's a technical reason it is the way it is though.

    Thanks for your help.

  • David McDonnell 53 posts 251 karma points
    Mar 11, 2019 @ 12:49
    David McDonnell
    0

    Hi Jesse, I think I am having a similar issue to you, did you ever manage to get a custom grid editor to pull through on the translation manager?

    I am attempting something similar here: https://our.umbraco.com/packages/backoffice-extensions/translation-manager/translation-manager-feedback/96038-custom-grid-editor-translation-manager

    Cheers David

Please Sign in or register to post replies

Write your reply to:

Draft