Note that there are some explanatory texts on larger screens.

plurals
  1. PONested Folders in MVC3 Visual Studio 2010
    primarykey
    data
    text
    <p>I'm a web developer new to using the MVC3 framework. We're building a site that implements a lot of sub folders for different segments of our audience. This routing concept is throwing a wrench in our structure for SEO. </p> <p>In my global.asax file under the routing section we have:</p> <pre><code>routes.MapRoute("test", "test/{testFirst}/{testSecond}", new { controller = "test", action = "RouteTest", testSecond = UrlParameter.Optional }); </code></pre> <p>and in my controller we have:</p> <pre><code>public ActionResult RouteTest(string testFirst, string testSecond) { return View(testFirst, testSecond); } </code></pre> <p>When I run the site and try to go to /test/test/index it won't pull up the view. It's stuck looking for test.cshtml which doesn't exist because it's a folder not a file. </p> <p>Any ideas on to how make nested folders work?</p> <p><strong>EDIT:</strong> Here's a branch of the structure we want and maybe it will help with what I'm trying to accomplish.</p> <p>This is kind of hard to show but it should get the idea across. We have 5 different audiences that come to the site. I broke down 1 audience and what the flow of that audience is. </p> <p>Not all segments will have products some are just content other segments have that 3rd level and have products to view</p> <p>audience</p> <ul> <li>segment</li> <li>segment <ul> <li>products</li> </ul> </li> <li>segment <ul> <li>products</li> </ul> </li> <li>segment</li> </ul> <p>This is the basic structure that we want the URLs to take</p> <p>domain.com/audience/segment/products/(productsname)</p> <p>Suggestions on how to make this possible </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload