tutorial02.rst 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. Tutorial Part 2: Adding Pages
  2. =============================
  3. We're going to add some placeholder pages to our project.
  4. We will go in more detail and build these pages out later in the tutorial.
  5. Having placeholder pages will help when we build out out the homepage, navbar, and footer.
  6. We will be able to link to the correct page as we make button, image, nav and other links.
  7. This a preference not a requirement for Wagtail-CRX. You can build and link pages in any order.
  8. * Go back to the admin screen http://localhost:8000/admin/
  9. * In the side menu click **Pages** and then **Home**. This brings you here:
  10. .. figure:: images/tut02/pages_home.jpeg
  11. :alt: The pages dashboard.
  12. The pages dashboard.
  13. * Click add child pages
  14. * Choose **Web Page** in the create-a-page screen. This action brings you to a new Web Page screen.
  15. * Enter "About Us" in the title field.
  16. * Click **Save draft** at the bottom of the browser.
  17. .. figure:: images/tut02/about_us.jpeg
  18. :alt: About Us Webpage start
  19. The About Us webpage editor
  20. * Choose the up arrow ^ next to **Save draft**
  21. * Choose **Publish**
  22. .. figure:: images/tut02/about_us_publish.jpeg
  23. :alt: About Us Webpage start
  24. The about us web page editor
  25. * This will redirect you to the pages admin screen with the newly created About Us page.
  26. .. figure:: images/tut02/pages_home_about_us.jpeg
  27. :alt: The pages dashboard with the About Us Page
  28. The pages dashboard with the About Us Page
  29. Repeat this process again for the following web pages:
  30. * Careers
  31. * Our Products
  32. * Our Facility
  33. Be sure to **Publish** each page. Later when we setup links to these pages, they can give an error if the page is not published.
  34. In addition to web pages, we are going to add two different types of pages:
  35. **Form**
  36. * Add a child page
  37. * Choose **Form**
  38. * Enter "Contact Us" in the title field.
  39. * **Save** and **Publish**
  40. **Article Landing Page**
  41. * Add a child page
  42. * Choose **Article Landing Page**
  43. * Enter "What's New at CRX-pharma" in the title field.
  44. * **Save** and **Publish**
  45. After adding the pages the dashboard should look like this:
  46. .. figure:: images/tut02/pages_home_full.jpeg
  47. :alt: The pages dashboard with the all the pages
  48. The pages dashboard with the all the pages we just added. Notice you can choose how to sort your pages, the default is most recently updated.
  49. The last page is a child of a child page.
  50. * Hover over "Our Products"
  51. * Choose **Add child page**
  52. .. figure:: images/tut02/child_of_child_hover.jpg
  53. :alt: hover over our products
  54. Create a child page of Our Products
  55. * Choose **Web Page**
  56. * Enter "Bulk Sales" in the title field.
  57. * **Save** and **Publish**
  58. .. note::
  59. In the Pages Admin screen, there are options for editing, viewing, deleting, unpublishing,
  60. and to see the History of changes made on pages. Explore these powerful tools!
  61. Now we have all these pages let's build out the rest of the site.