6.6. Adding a Menu

Your blog should include a menu item that enables your users to get between the "Blog" and "About the Author" pages. Accomplishing this is a simple matter of adding a snippet of HTML to index.php below the main heading.

Open index.php in Eclipse and insert the HTML code in bold into the body of the page as indicated, just below the <h1> tag:

<body>

    <h1> Simple Blog Application </h1>
    <ul id="menu">
        <li><a href="/simple_blog/blog/">Blog</a></li>
        <li><a href="/simple_blog/about/">About the Author</a></li>
    </ul>

    <div id="entries">

Next, navigate to http://localhost/simple_blog/ to see the menu (see Figure 6-10).

Figure 6.10. Your blog application with a menu in place

..................Content has been hidden....................

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