Step 9 – Creating more pages, reusing your template
For this last step, we'll create another page (for Jupiter) using the same template just to demonstrate how a template may be reused.
- In ProcessWire Admin, click Pages and then click the new link to the right of the home page.
- Enter "Jupiter" as the Title and select "planet" for the Template. Click Save.
- Now that you are editing the Jupiter page, enter "Gas giant" for Type, enter "4.5 billion" for Age in Years, and copy+paste the following for Planet Summary:
Jupiter is the fifth planet from the Sun and the largest planet within the Solar System. It is a gas giant with mass one-thousandth that of the Sun but is two and a half times the mass of all the other planets in our Solar System combined. Jupiter is classified as a gas giant along with Saturn, Uranus and Neptune. Together, these four planets are sometimes referred to as the Jovian or outer planets.
- Click the Publish button and then View the page. You should now see your planet template being used to output the information for Jupiter rather than Earth.
Next: Conclusion »
- Introduction and First Steps
- Create a Template and a Page
- Setting up Custom Fields
- The Template File
- More Pages
Your e-mail is kept confidential and not included with your comment. Website is optional.