I am currently upgrading my site from 4.0.2.1 to 4.11.1. Quite a lot of issues, but there is one that I cannot solve without changing the core, so it seems:
I used to replace the main tree by changing the umbracoAppTree table and set it to my own loadContent provider.
but in 4.11.1, the main tree is loaded because it has been decorated with the Tree attribute in the core (ApplicationDefinitions.cs and loadContent.cs):
[Tree("content", "content", "Content", silent: true)] public class loadContent : BaseContentTree {
......
Because the applications.config and trees.config are rewritten at startup, I cannot intercept this routing.
Step 1: load the trees by searching all classes that are decorated with the Tree attribute.
Step 2: load all the trees that are in the database (umbracoAppTree table) but only for aliases that have not been defined yet in the previous step.
Therefore, I cannot override any default tree (content, media) because these have been added in step #1. I don't like changing the core. Is there any other way?
replacing main content tree in umbraco 4.11.1
Hi,
I am currently upgrading my site from 4.0.2.1 to 4.11.1.
Quite a lot of issues, but there is one that I cannot solve without changing the core, so it seems:
I used to replace the main tree by changing the umbracoAppTree table and set it to my own loadContent provider.
but in 4.11.1, the main tree is loaded because it has been decorated with the Tree attribute in the core (ApplicationDefinitions.cs and loadContent.cs):
[Tree("content", "content", "Content", silent: true)]
public class loadContent : BaseContentTree
{
......
Because the applications.config and trees.config are rewritten at startup, I cannot intercept this routing.
How can I replace the main content tree?
TIA
To clarify:
Umbraco policy for loading trees is (in 4.11.1):
Therefore, I cannot override any default tree (content, media) because these have been added in step #1.
I don't like changing the core.
Is there any other way?
is working on a reply...