Step 1 — Get a starter website¶
You can find all files used and modified in this step on GitHub.
To set up the starter website, you need to follow these steps:
Get a clean eZ Enterprise installation¶
To begin the tutorial, you need a clean installation of eZ Platform Enterprise Edition.
Create Content Types¶
Log in to the Back Office – add
/admin to your installation's address (
<yourdomain>/admin) and log in using
admin as the login and
publish as the password. In Admin go to Content types tab and (under the Content category) create two Content Types with the following settings:
- Name: Dog Breed
|Text line||Short Description||
- Name: Tip
Modify existing Article Content Type¶
You also need to modify the built-in Article Content Type. It will make inserting photos into articles easier. Edit it to remove the Image Field that has a Content Relation (ezobjectrelation) type, and create a new Field in its place:
Add template, configuration and style files¶
For an introduction on how to use templates in eZ Platform, take a look at the Building a Bicycle Route Tracker in eZ Platform tutorial
First, delete the
config/packages/ezplatform_welcome_page.yaml file to remove the welcome page.
Place two configuration files in the
assets folder in the project root:
- create a
cssfolder and add the following stylesheet:
- create an
imagessubfolder and add the
header.jpgfile to it
webpack.config.js file in the project root folder with the provided file.
Next, in the terminal run the commands:
Compiling assets with Webpack Encore is explained in the beginner tutorial.
src folder create a
QueryType subfolder and add
QueryType/MenuQueryType.php to it.
This file takes care of displaying the top menu (read up on it in the documentation). It is not the scope of this tutorial and we won't go here into detail on how it works.
This is what the structure of the new and modified files should look like (excluding pre-existing files):
Now return to the Back Office and create some content for your website.
First, make three Folders under the
Content/Content structure tab. Call them 'All Articles', 'Dog Breed Catalog' and 'All Tips'. Remember that you save and close them by using the 'Publish' button.
Next, create a few Content items of proper Content Types in each of these folders:
- 4 Articles (at least, to best see the effects of the Content Scheduler block that you will create in step 3.)
- 3 Dog Breeds
- 3 Tips
Finally, remove the "eZ Platform" folder. You will not need it for this tutorial.
When you need an image, you can use one from this image pack. This will let you compare effects of your work to screenshots in the tutorial.
At this point you are ready to proceed with the next step.