Coffeehouse Thread

75 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

I can't believe how much web programming has changed

Back to Forum: Coffeehouse
  • User profile image

    , Sven Groot wrote

    And how do you do static pages with Razor? I want them to be able to use the global layout, so I do plan to convert the static pages to .cshtml. But it seems you can't just serve static .cshtml files without a controller serving them up as views.

    Well, if you tried to render a view without a controller, you'd be breaking out of MVC. Not sure how you'd use the global layout outside of MVC...seems like a lot of internal plumbing that you would have to manually execute somehow.

    I don't think you could do much with the codebehind pages w/o modifications...the only way to serve them up properly so that they still work would be through an iframe. But then, you'd still have to modify those pages to strip out the menus and surrounding chrome.

    My suggestion for the static pages still could just use jquery to load in something like the #contentInner section div into your MVC view (just have one view based on id). You wouldn't have to modify each static page in that case.

  • User profile image
    Sven Groot

    I ended up going with a variation of my own idea. I put the list for the index page in the DB, and generate that using the typical MVC approach. The individual project pages are separate views, and the controller selects which view to show based on the URL. It's the only way I could think of to be able to have each project page be a separate .cshtml file.

    So the software section is now also using the new look. Smiley

  • User profile image

    Looks good!

    I'm right now doing a revamp of my personal site, too, and decided to try foundation. I absolutely love it. Although, I'm probably not going to use MVC - I've gotten into the habit of just doing web service/knockout+html5. If I later want a holographic representation of my life, I can just consume the existing web service.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.