This is assignment #2 from Deane Barker's Introduction to Content Management class. This is an interactive assignment, which will be completed in the interface below.
In this assignment you will work on three templating tasks. The goal of these tasks is to:
Below you will find three separate templating tasks. For each task, you will be presented with a wireframe and some information about the content available to each template.
Enter HTML and templating code in the "Template Code" editor, then press "Refresh Result" to execute that templating code against the content and see your result.
Your goal is to achieve a result which meets the requirements in the wireframe.
Some notes:
When you are satisfied with your solutions, enter your name in the box below, and click "Download Assignment" button. You will be prompted to download a text file which contains the information entered here. You will submit this text file to the instructor as your assignment.
For all the tasks below, you will be working with two content types: a "TextPage" type, and a "Movie" type. For each task, you will be told what content objects are available, and what variables represent each of them in the template.
| Attribute Name | Attribute Type | Sample Data |
|---|---|---|
| title | Simple Text | "Movie Listing" |
| text | Rich Text | "This is some text about the page..." |
There are three different movie objects.
| Attribute Name | Attribute Type | Sample Data |
|---|---|---|
| id | Number | "13" |
| title | Simple Text | "Casino Royale" |
| date_released | date | "2006-10-01" |
| summary | Simple Text | "A solid start for new Bond actor..." |
| review | Rich Text | "I did not enjoy this movie for these reasons..." |
| actor | Simple Text | "Daniel Craig" |
This is the information about the templating language you will need to know.
For this task, you will render a page with a title, some introductory text, and a list of of movies.
The following variables are available to your templating code. The operative content object in this case is a TextPage. A list of Movie objects will also be provided.
| Variable Name | Type |
|---|---|
| current_content | A single TextPage object |
| movies | A list of Movie objects |
For the second task
For the third task