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
    Jul 20, 2020 @ 21:49
    Jesse Andrews
    0

    Is there a way to combine two tree routes into a single tree?

    Umbraco Version: 8.6.3

    I have a custom TreeController for a custom section within the backoffice with the following content structure.

    Widgets

    • Widget 1
      • Variant 1
      • Variant 2
    • Widget 2

    The widgets should have the path /widgets/widgets/edit/{id}, while the variants have the path /widgets/variants/edit/{id}. I can't use a single path because they are populated by different databases and so can have the same id. I've already configured the tree to set these paths, but I haven't found a clean way to resolve the path properly, as requests for variant views go to the /umbraco/views directory instead of the plugin directory. I've been able to get around this so far by creating an empty tree with the desired path for this second url, but haven't found a clean way to hide the tree that creates (could do it with css, but that's a bit hackish).

    Worse comes to worse, I can redirect the specific paths I need from the umbraco view to my plugin directory, but I would prefer to tie into existing umbraco logic if it exists. Any ideas?

Please Sign in or register to post replies

Write your reply to:

Draft