cloudscribe / cloudscribe.templates

dotnet new templates for cloudscribe
Apache License 2.0
5 stars 3 forks source link

With folder multi-tenancy and "Pages and Blog with Home Controller as default route" the Pages don't work in child sites #66

Closed CrispinF closed 2 years ago

CrispinF commented 3 years ago

The navigation.xml shipped with these choices includes this for the SimpleContent Pages:

       <NavNode key="Pages"
            url="/p"
            text="Articles"
            componentVisibility=""
            treeBuilderName="cloudscribe.SimpleContent.Services.PagesNavigationTreeBuilder"
            treeBuilderAppendToBuilderNode="true">
        <Children />
        </NavNode>

So if we create a second site, the Articles menu item navigates to the page in the first tenant. One way to resolve this is to create a navigation.{guid}.xml for the second site (as per https://www.cloudscribe.com/different-menu-items-per-tenant ) and alter the url attribute to this: url="/t1/p" where t1 is the foldername I gave the tenant. But this feels hard going for someone using cloudscribe for the first time, and they will probably think it's broken. Can we do better? Maybe instead of the url attribute can we name a controller?

JimKerslake commented 2 years ago

Yes that works - I'll modify navigation.xml and include that in template source code - won't get deployed till we release a 5.0.1 at a future point.

JimKerslake commented 2 years ago

Tested this works in folder-name multi-tenancy