Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Composite C1 Routing with optional parameter on root page

$
0
0
Hi everyone,

I'm pretty new to Composite C1 and have run into an issue that I haven't been able to find a solution too, despite multiple web searches. I am working on bringing up a very small, one-page website with its content managed by Composite. One of the requirements is to be able to support an optional parameter on the site root which can be used to customize the content of the page. The intent would be that a given user could navigate to http://mynewcompositesite.com/ or http://www.mynewcompositesite.com/{username}, and the same Composite page would be rendered, except in the second case, we could display some user-specific content based on the provided parameter. The set of usernames is arbitrary, so we cannot simply hard-code routes. It is possible to configure mappings within the RouteConfig class in a standard MVC project to accommodate this scenario rather easily, but since Composite seems to use a different mechanism for its route handling, I'm not sure whether this sort of thing is even possible using Composite. I played around with C1PageRoute.RegistrePathInfoUsage() in my page template, but still get a 404 when appending anything after the root. I realize this is somewhat of an odd request, but would greatly appreciate if anyone has any ideas on whether and how this might be accomplished. Much thanks in advance.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>