Skip to the content
Documentation

Step 2 - Create your content model: comparison of v.2 vs ...

No ratings yet

Versions Compared

Old Version 2

changes.mady.by.user Sarah Haïm-Lubczanski

Saved on May 09, 2016

compared with

New Version Current

changes.mady.by.user Sarah Haïm-Lubczanski

Saved on Dec 19, 2016

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Comment: adding a create a content type image button

Table of Contents
outline true
style none
Panel
borderWidth 0
borderStyle none
How your content is structured is a very important part of an eZ Platform project. Think of it as the database design of your application. We recommend that you read the Fundamental concepts documentation page, but you can also read the paragraph below for a short, straight-to-the-point introduction.

Content Model Overview

The eZ Platform content repository is centered around Content items, pieces of content: an article, a product review, a place...

Every Content item is built based on blueprints, called Content Types. They are named entities that define what information makes up a particular type of content: article, product review, place. An article could include a title, a main image, an abstract, the article's body, a publication date, and a list of authors. Those named entities are called Field Definitions, as they define what Fields a Content item is made of. A Field Definition sets the main information of a field: name, identifier, and type. Any Content Type can also be a container, meaning that it can act as a "directory", and contain other Content items.

The available Types for Field Definitions can be any of the installed Field Types, about 30 in the default distribution. Each is built to represent a specific type of content field: a text, a block of rich text, an image, a collection of relations to Content items, etc. You can find a complete list in the 

FieldTypes

Field Types reference section. Every Field Type may have its own options, and comes with its own editing and viewing interfaces.

According to what you want to store, and what you want to do with it, you will create a set of Content Types and populate the Content Tree with them.

Create your Content Types

The site will use two Content Types: Ride and Point of interest

Drawio
border true
viewerToolbar true
   
fitWindow false
diagramName Ride_Point_of_interest_relation
width  
pageId 32868756

This is an overview of the content model we will implement an N-N relationship model:

   Ride ------------------------ Points of interest
           1..*                   1..*

Go to the admin interface ("<yourdomain>/ez"), and authenticate with the default username: admin / and the default password : publish. Click  

Click on Admin Panel in the Navigation hub, and choose Content types in the sub menu:

Image RemovedImage Added

You will see a list of Content Type Groups. They are used to group content types in a logical way.

Click on Content and then click on Create a content type. 

Image Added

We will create the Ride Content Type first:

Create the Ride Content Type

A bike ride, with a description and some extra info, like who took this ride for the first time, or points of interest it goes through.

Fill the form with this basic info: 

Name: Ride
Identifier: ride
Content name pattern: <name> 

Then create all fields with the following information: 

Name Identifier Field Type Required Searchable Translatable Others
Name name Text line yes yes yes  
ImagePhoto imagephoto Image no yesno no  
Description description Rich text yes yes yes  
Difficulty level level SelectSelection yes yes no Add a couple of levelsLevels, such as "beginner, intermediate, advanced"
Starting point starting_point Map location yes yes no  
Ending point ending_point Map location yes yes no  
Length length Integer yes yes no  
Author author Authors no yes yes  

Populate your Content tree

Go back to the Content tree and create a Folder named All Rides using the Create button in the Action bar on the right of the screen.

Image RemovedImage Added

In the folder, create a couple of Rides, using the Create button, being on the Content "All Rides" so the new Content will be created as a child directly.

Next: Part 2: Working on the Ride >

< Previous: Step 2 - Don't worry, if you created the Content elsewhere, you can move it later.

Image Added

Ready for Step 3

Image Added

You have now : 2 Rides (or more) in a Folder and are ready to customize the Homepage of your Go Bike website !

Section
Column
width 50%
 ⬅ Previous: Step 1 - Setting up eZ Platform
Column
 Next: Step 3 - Customizing the general layout ➡

 

 

Panel
borderColor #f58220
borderWidth 2
title Tutorial path
Page Tree
root Building a Bicycle Route Tracker in eZ Platform

Comments

Add a comment

Comments are read by a moderator before they appear.