Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Module 6: Modules and views

The sixth module of the Developers course. Learners read module.php files, write a view with parameters and a template, protect it with a policy function granted through a role, and handle a form with actions…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/trainers/developers/module-06-modules-and-views/README.md

On this page

Module 6: Modules and views

A module view is how an extension gets pages of its own. This module explains how an address reaches a view, then learners build the view hello/greet step by step: parameters and a template, a policy function and a role, and finally a form with an action, validation and a redirect, protected by the form token.

At a glance

CourseDevelopers
Duration3 hours 35 minutes (with one 10-minute break)
Lessons4
LevelIntermediate

Lessons

LessonDurationWhat learners do
Lesson 6.1: How modules and views work45 minutesSplit addresses, read module.php, follow a view to its class
Lesson 6.2: A view of your own55 minutesWrite hello/greet with parameters, a template and a breadcrumb
Lesson 6.3: Policies for your views50 minutesDeclare greet as a policy function, grant it to the Anonymous role
Lesson 6.4: Forms and actions in a view55 minutesPost a form, validate, redirect, see the form token at work

Preparing this module

  • Each learner has the hello module from lesson 5.4 and an administrator account on their own training installation; lesson 6.3 changes the Anonymous role, which must not be shared between learners.
  • Know how your training site is matched (by path such as /site/, or by host) so learners type the right addresses.
  • Keep a finished module.php, greet.php and greet.tpl at hand for learners who fall behind.
  • Rehearse lesson 6.4 step 8 in the browser you will use on the projector: removing a field with the developer tools differs slightly between browsers.

Timing plan

PartMinutes
Lesson 6.145
Lesson 6.255
Break10
Lesson 6.350
Lesson 6.455
Total215

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x