sitecore 网站的主页抛出错误

发布于 2024-08-20 09:07:13 字数 799 浏览 4 评论 0原文

我是 Sitecore 的新手,正在使用 Sitecore 6 构建我的第一个网站。

我创建了一个布局和子布局,并根据该布局创建了一个新模板。我还根据模板创建了一个内容项。

我已发布所有内容,但在尝试访问该网站时出现错误。

错误是:找不到所请求文档的布局。

仅当使用 http://localhost/ 访问站点时才会出现此错误,但使用 http://localhost/homepage.aspx 时站点会按预期工作。当然,我需要该网站无需指定文件名即可工作。

使用 Fiddler,对 http://localhost/ 的请求的输出是:

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fsitecore%2fservice%2fnolayout.aspx%3fitem%3d%252f%26layout%3d%257b00000000-0000-0000-0000-000000000000%257d%26device%3dDefault">here</a>.</h2>
</body></html>

看起来我需要指定哪个页面是我的起始页面,但我看不到执行此操作的选项。

任何帮助将不胜感激。

I am new to Sitecore and am building my first site using Sitecore 6.

I have created a layout and a sublayout and created a new template based off the layout. I have also created a content item based off the template.

I have published everything and have got an error when I attempt to acces the site.

The error is: The layout for the requested document was not found.

This error only occurs when accessing the site using http://localhost/ but the site works as expected when using http://localhost/homepage.aspx. Of course I need the site to work without having to specify a filename.

Using Fiddler the output from the request to http://localhost/ is:

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fsitecore%2fservice%2fnolayout.aspx%3fitem%3d%252f%26layout%3d%257b00000000-0000-0000-0000-000000000000%257d%26device%3dDefault">here</a>.</h2>
</body></html>

It looks like I need to specify which page is my start page but I can't see the option to do this.

Any help would be appreciated.

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

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

发布评论

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

评论(1

虚拟世界 2024-08-27 09:07:13

这归结为两个问题:为什么看不到您的页面以及如何设置起始页。

设置页面布局

为了让 Sitecore 能够显示您的页面,它需要知道要使用什么布局。您可以直接在页面上设置它,或者更常见的是,在项目模板标准值上设置它。
布局存储在“/sitecore/layout/Layouts”中,它们对应于 .net aspx 文件。还有渲染 (XSLT) 和子布局 (ascx),它们与布局和内容项相结合以形成页面上的输出。

关于起始页:

Sitecore 在 web.config 的配置/sitecore/sites 部分中定义了站点起始页,请查看名为“website”的站点标签。通常这被设置为rootPath“/sitecore/content”中的startItem“/home”,您将在Sitecore GUI中找到相应的路径。

关于这一点还有很多要说的,我真的会推荐 sitecore 中的入门课程。请联系我们当地的办事处,他们将很乐意提供帮助。

This boils down to two questions: Why you can't see your page and how to set the startpage.

Setting a layout for a page

In order for Sitecore to be able to display your page it needs to know what layout to use. You can set this directly on the page or, more commonly, set it on the items templates standard values.
The layouts are stored in "/sitecore/layout/Layouts" and they correspond to a .net aspx-file. There are also Renderings (XSLT) and Sublayouts (ascx) that are combined with the layout and content item(s) to form the output on the page.

Regarding the startpage:

Sitecore defines the sites starting page in web.config in the section configuration/sitecore/sites, have a look at the site-tag with the name "website". Normally this is set to startItem "/home" in rootPath "/sitecore/content", you will find the corresponding path in your Sitecore GUI.

There are much more to be said on this, I would really recommend an introduction course in sitecore. Contact our local office and they will be happy to assist.

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