开发者

Adding my own page to a subtext application

开发者 https://www.devze.com 2022-12-11 07:17 出处:网络
I\'ve just installed subtext and am intending on hosting on discountasp.net. I 开发者_如何转开发want to add my own pages to the application (just 3) but if I add a standard aspx I get a 404. I\'d idea

I've just installed subtext and am intending on hosting on discountasp.net. I 开发者_如何转开发want to add my own pages to the application (just 3) but if I add a standard aspx I get a 404. I'd ideally like to have a masterpage that uses some of the list controls in subtext so I can keep a list of Recent Posts and Archive on the side bar. It's an ideal, otherwise I could create a couple of my own controls to drop into the page to replicate IF that's not possible.

Any ideas?


Note: This applies to Subtext 2.1.2 and below

You'll need to add a handler mapping in web.config. Subtext tries to handle all requests.

The easiest thing to do is to create a directory where you want all your custom pages to live and map a PageHandlerFactory for that directory.

For example, search for the following in web.config

<add verb="*" path="HostAdmin/*.aspx" type="System.Web.UI.PageHandlerFactory"/>

And add the following line after

<add verb="*" path="custompages/*.aspx" type="System.Web.UI.PageHandlerFactory"/>

In the upcoming Subtext 2.5, you won't need to do this. You can simply drop your page anywhere in a directory and it'll just work.

0

精彩评论

暂无评论...
验证码 换一张
取 消