I see now how it handles the root instead of plaintext/about.html --
didn't have my coffee before reading.  Thanks again!  I'm renaming
the .html to .vm for now until I can figure out a way to handle that.

On Sep 2, 9:04 am, JakeS <[email protected]> wrote:
> That looks pretty simple, thanks!  Will I have to use routing to get
> this to apply to the root of the site, so it works 
> withhttp://mysite.com/about.html
> instead ofhttp://mysite.com/plaintext/about.html? And I guess I'll
> have to rename the .html files to be .vm?
>
> I'm trying to make this as friction-free as possible because these
> static pages are being provided and updated regularly by someone who's
> comfort zone is dreamweaver + html.  The less I have to do each time
> an update is made, the better.
>
> I thought I'd got it by chaning the mapping to ISAP from "*.html" to */
> *.html", but it looks like IIS isn't that specific.
>
> On Sep 2, 6:29 am, James Curran <[email protected]> wrote:
>
> > Funny, I was just about to write a blog post about this.   Here's what I 
> > use"
>
> >     [DefaultAction]
> >     public abstract class PlainTextController : SmartDispatcherController
> >     {
> >         public void DefaultAction()
> >         {
> >             string template = "notfound";
>
> >             if (HasTemplate(this.ControllerContext.Name +"/" + Action))
> >             {
> >                 template = Action;
> >             }
>
> >             RenderView(template);
> >         }
> >     }
>
> >     [Layout("default"), Rescue("generalerror")]
> >     public class MySiteController : PlainTextController { }
>
> > Then, you just need the .vm (or .brail etc) files in your views folder
> > for the static pages.  This gives you the advantage of being able to
> > use layouts for those pages.
>
> > On Tue, Sep 1, 2009 at 11:29 PM, JakeS<[email protected]> wrote:
>
> > > I've got a monorail site that's running with controllers mapped to
> > > "*.html" pages so the URLs arehttp://mysite.com/controller/action.html
>
> > > Now I've been given a set of static pages that we need to put into the
> > > root of the site... something likehttp://mysite.com/about.html.
>
> > > Is there an easy way to do this?  Or do I have to create a
> > > "StaticController" for these static pages with actions for each one
> > > and use routing to turn /about.html into StaticController's "about"
> > > action?
>
> > --
> > Truth,
> >     James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to