Bloated tree structure, is there anything like 'routing transparent container' ?

Vote:
 

Imagine such Episerver parent folder structure, with 50 child pages:

0) ParentFolder
    1) Page A1
    2) Page A2
    ...
    30) Page B10
    40) Page C25

Unfortunately SEO forces such page structure. Is it possible to group pages without affecting routing - I`m looking for something like I called 'routing transparent container' ?
I know that I could create a partial routing for such specific ParentFolder, but what if I have many ParentFolder`s, would I need to end with many partial routers?
Any ideas ?

#158308
Sep 27, 2016 11:20
Vote:
 

You can use the addon

http://world.episerver.com/add-ons/powerslice/

for instance. It's a solution to the same problem but from a different angle.  

Otherwise no, don't think there is such a concept in Episerver CMS as "routing transparent folder". 

The other solution is of course to structure the pages after created date and automatically create folders for 2016, 2017 etc or similar for month...

#158310
Edited, Sep 27, 2016 12:03
Vote:
 

Hi Daniel,

yes I know Powerslice, but it`s not the direction I would like to go.

I`m thinking of coding such functionality, but have some doubts - as it seems to be quite a common requirement but for some reasons it`s missing in Episerver.

I`m not the expert when it`s about routing in Epi, but my general idea is that such folder:

- would need to autoregister as partial router

- then the additional cost of having it, would be the increased cost of routing, as it would need to traverse child folders when determining the route to content

So it look not too complicated to implement, but could be possible devasting to performance, or I missed something more?

#158314
Sep 27, 2016 13:13
Vote:
 

Well rewriting part of the core routing is not very easy. I've been diving pretty deep into those water when writing the SEO Manager plugin.

Can be done definitely but there are quite a few problems to solve...

It will take a pretty substantial effort and the gains will be pretty slim in my opinion. I would add it as a feature request to Episerver rather than implement it myself...

Unless you think it's a fun development challenge...which it is :)

#158321
Edited, Sep 27, 2016 13:59
Vote:
 

Thanks Daniel,

yes it looks as a fun challange, but unfortunately I have long list of those, and this is currently at the very bottom.

So, feature requested createad here:

http://world.episerver.com/forum/developer-forum/Feature-requests/Thread-Container/2016/9/routing-transparent-containers/

Please to back me up there :)

#158325
Sep 27, 2016 14:41
Vote:
 

An alternative (dependent on your content structure) might be to define a route that starts from a custom root (like some container). There are possibilities to define custom content routes with a different start point for routing than default (default there are routes set up to serve content from startpage, global asset root, content asset root etc.).

You can specify your custom route as:

  protected override void RegisterRoutes(RouteCollection routes)
        {
            //This will be the start for the route, e.g. could be some container
            var myContainer = new ContentReference(189);
            routes.MapContentRoute(
                name: "containerRoute",
                url: "{language}/{node}/{partial}/{action}",
                defaults: new { action = "index" },
                contentRootResolver: s => myContainer);

            base.RegisterRoutes(routes);          
        }
#158327
Sep 27, 2016 14:49
Vote:
 

Johan it`s brilliant, lovely alternative. However, one thing is still left, Episerver will still generate links with the container folder.

One simple solutions comes to my mind - adding outbound links rewrite, but this looks a bit hacky to me.

Any idea for clearer solution?

#158340
Sep 27, 2016 17:12
Vote:
 

Yup, the UrlResolver will throw a curve ball back that you will need to handle :)

#158341
Sep 27, 2016 17:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.