views:

269

answers:

1

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.

+2  A: 

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.

Zooking
Renaming the homepage to home has fixed the issue. +1
DaveC