I'm trying to create a tree handler that inherits from the loadContent tree, to replace the default one, but I'm struggling to get it to work.
I have an assembly, MyAssembly.dll, which has a class CustomContentTree, which inherits from the loadContent class, as per the Wiki on trees. I've changed the treeHandlerAssemby to MyAssembly and the TreeHandlerType to CustomContentTree in the DB, and I just get a content folder with nothing underneath. I've tried just copying loadContent from the core and renaming it, as I'd have though that would work, but no dice.
Nothing appears to get logged in the log, I'm not even sure it's even loading the assembly. Does anyone have any ideas what I might be doing wrong?
Figured this one out in the end. It looked like if I had a namespace that wasn't the same as the assembly name in the compiled DLL, then Umbraco wouldn't load the handler. As soon as I changed the namespace to be the same as the assembly name, it worked!
Inherit From loadContent = no content
Hi,
I'm trying to create a tree handler that inherits from the loadContent tree, to replace the default one, but I'm struggling to get it to work.
I have an assembly, MyAssembly.dll, which has a class CustomContentTree, which inherits from the loadContent class, as per the Wiki on trees. I've changed the treeHandlerAssemby to MyAssembly and the TreeHandlerType to CustomContentTree in the DB, and I just get a content folder with nothing underneath. I've tried just copying loadContent from the core and renaming it, as I'd have though that would work, but no dice.
Nothing appears to get logged in the log, I'm not even sure it's even loading the assembly. Does anyone have any ideas what I might be doing wrong?
Figured this one out in the end. It looked like if I had a namespace that wasn't the same as the assembly name in the compiled DLL, then Umbraco wouldn't load the handler. As soon as I changed the namespace to be the same as the assembly name, it worked!
:)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.