将我自己的页面添加到潜文本应用程序

发布于 2024-08-11 00:15:28 字数 202 浏览 3 评论 0原文

我刚刚安装了 subtext,并打算在discountasp.net 上托管。我想将自己的页面添加到应用程序中(仅 3 个),但如果添加标准 aspx,则会收到 404。理想情况下,我希望有一个在副文本中使用某些列表控件的母版页,以便我可以保留一个列表侧栏上的最近帖子和存档。这是一个理想的选择,否则我可以创建几个自己的控件放入页面中以复制如果这是不可能的。

有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁的新欢旧爱 2024-08-18 00:15:28

注意:这适用于 Subtext 2.1.2 及更低版本

您需要在 web.config 中添加处理程序映射。 Subtext 尝试处理所有请求。

最简单的方法是创建一个目录,您希望所有自定义页面都位于其中,并为该目录映射 PageHandlerFactory。

例如,在 web.config 中搜索以下内容

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

,并在后面添加以下行。

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

在即将推出的 Subtext 2.5 中,您不需要执行此操作。您只需将页面放在目录中的任何位置即可正常工作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文