Your home page, CMS pages, and static blocks

As a store owner, your first focus point regarding the design of your site is often your home page. A home page in Magento is a part of Magento's content management system (CMS) by default. Magento's CMS allows you to add pages and static blocks. A page is, as expected, a web page that can be accessed on your store. A static block is a piece of content that can be used anywhere on pages within your store, such as the list of links in your site's footer.

The CMS of Magento can be accessed directly from the main menu in the admin. To edit the home page, open CMS | Pages. You'll see several pages, including an About Us page that is included by default. An example overview of CMS pages, as they are found in a default installation with sample data, is shown in the following screenshot:

Your home page, CMS pages, and static blocks

Click on the page titled Home page. Now an edit screen opens with several input fields visible immediately. The URL key merits special attention; the value you enter here is the part of the URL that will be placed after your domain name to access the page. For instance, the home page has home as the URL key. Because it's the home page, this means that this page can be accessed from http://www.yourdomain.com/ as well as http://www.yourdomain.com/home/. In the next screenshot you can see what the CMS page edit screen looks like:

Your home page, CMS pages, and static blocks

Editing the content of the home page can be done by clicking on the Content tab in the menu on the left of the screen. When the editor, which can be switched between WYSIWYG (what you see is what you get) and HTML mode, opens you will find the following screen:

Your home page, CMS pages, and static blocks

The preceding screenshot is what HTML mode looks like, while the WYSIWYG mode is displayed as follows:

Your home page, CMS pages, and static blocks

In our current example, the left column is part of the home CMS page. The standard home page with Magento's sample data shows an image of women's shoes as you can see in the following screenshot:

Your home page, CMS pages, and static blocks

After removing the top image from that column and replacing it with the text The greatest store in the world, the change is visible immediately after saving:

Your home page, CMS pages, and static blocks

Note

Making changes in HTML mode allows for more precise edits but requires HTML knowledge.

After making the change the above the CMS edit screen is displayed, while the following screenshot shows what your front page looks like after making the edit:

Your home page, CMS pages, and static blocks

Editing static blocks follows a similar method. For instance, footer links are displayed as follows. As previously mentioned, the footer links are an example of a static block:

Your home page, CMS pages, and static blocks

You can edit the footer links by going to CMS | Static Blocks as displayed in the following screenshot and opening the block with title Footer links.

Your home page, CMS pages, and static blocks

After clicking on the Footer links block, a familiar edit page opens:

Your home page, CMS pages, and static blocks

In our example, we've changed the first link to say About our awesome store, which is reflected on all pages. In a Magento installation without sample data, Footer links is the only static block that is present by default. Adding and displaying additional static blocks in your store requires Magento theming knowledge that is outside of the scope of this book:

Your home page, CMS pages, and static blocks

In the following screenshot you can see the change reflected in the frontend of the store:

Your home page, CMS pages, and static blocks
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset