Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding your own tree group to Content section breaks #7867

Closed
skttl opened this issue Mar 31, 2020 · 8 comments
Closed

Adding your own tree group to Content section breaks #7867

skttl opened this issue Mar 31, 2020 · 8 comments
Labels
status/stale Marked as stale due to inactivity

Comments

@skttl
Copy link
Contributor

skttl commented Mar 31, 2020

I know you are probably not supposed to do this, but you can... :)

I tried adding a custom tree to the content section, in its own tree group.

The content tree was then moved to a Third Party group, and inside the tree root node Content.

I would expect the content tree to keep working like normal, and then the custom groups displayed beneath.

image

Also tried renaming the group to Content, that got me this:
image

@nul800sebastiaan
Copy link
Member

Can you please always mention a version, how/when does it break, some sample code would be good so it can be reproduced etc. There's a bug reporting template for a reason, we do need to know the answer to a lot of questions. 😁

Thanks!

@nul800sebastiaan nul800sebastiaan added the state/needs-more-info We don't have enough information to give a good reply label Mar 31, 2020
@skttl
Copy link
Contributor Author

skttl commented Mar 31, 2020

Oh, sorry 😳 It's 8.5.5 :)

    [Tree(Constants.Applications.Content, "mytree", TreeTitle = "Status", TreeGroup = "Content")]
    public class MyTreeController : TreeController
    {
        protected override MenuItemCollection GetMenuForNode(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormDataCollection queryStrings)
        {
            // removed for brevity
        }

        protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
        {
            var root = base.CreateRootNode(queryStrings);

            // set the icon
            root.Icon = "icon-umb-settings";
            // could be set to false for a custom tree with a single node.
            root.HasChildren = true;

            return root;
        }

        protected override TreeNodeCollection GetTreeNodes(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormDataCollection queryStrings)
        {
            // removed for brevity
        }
    }

I would expect it to look like this
image

I was unsure if I should file this as a bug, feature request or something else. I guess this is pretty much an edgecase - but could be very useful for stuff like having data-nodes (settings, categories etc.) seperated from real content in your content tree :)

@umbrabot
Copy link

umbrabot commented Apr 2, 2021

Hiya @skttl,

Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more.

We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed).

To open it this issue up again, you can write @umbrabot still relevant in a new comment as the first line. It would be super helpful for us if on the next line you could let us know why you think it's still relevant.

For example:

@umbrabot still relevant
This bug can still be reproduced in version x.y.z

This will reopen the issue in the next few hours.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@umbrabot umbrabot added the status/stale Marked as stale due to inactivity label Apr 2, 2021
@umbrabot umbrabot closed this as completed Apr 2, 2021
@umbrabot umbrabot removed the state/needs-more-info We don't have enough information to give a good reply label Apr 2, 2021
@skttl
Copy link
Contributor Author

skttl commented Jun 10, 2021

Just saw @AndyButland doing something similar
image

@abjerner
Copy link
Contributor

This may not be considered a bug, as it probably always hasn't been possible, but it's something I'd like to see as well.

I couldn't tell from Andy's talk yesterday, but I suspect his example is the normal content tree, but with multiple content nodes at the top. This is what we're also doing ourselves - typically having a Data or Modules node at the root level as well.

@AndyButland
Copy link
Contributor

That's the setup I used used - code is here if interested. But it's just a custom tree controller setup to display within the "Content" section.

@abjerner
Copy link
Contributor

Thanks @AndyButland 👍

I didn't think this was possible. Things seem to explode if you specify a tree group - both for Content or something custom.

Maybe it's because the content tree doesn't actually specify a tree group? So the default Content group shown in the UI comes from the section, and not the tree.

@AndyButland
Copy link
Contributor

Could be... to be honest I didn't think about this too much and haven't done this type of back-office customisation for a while; just wanted to get a a tree "working" so I could test out the developments I was looking to work on for Deploy. So once it appeared, I was happy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/stale Marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

5 participants