3.1.1 Controllers



What is a Controller?

A controller is used to intialise a pages data in the system, e.g. a blog page. Controllers are then used to create Collections or Entities of data.

A blog pages data can fx. is initialised through a controller, as shown below.

*CODE* *SNIPPIT* {* Fetch a blogController and set it as primary *}{controller type=blog assign=controller primary=true}*CODE*

As shown above, it is possible to specify a standard parameter from the system and URL’s (Example: Use the ISO code and Specific ID) by setting primary=true.

Which controllers can be found in the system?

Use the code below to see what controllers you can find in the system (This opens up in a popup window).


How can I get data from a controller?

When a controller is initialised, you need to use a Collection or Entity to get data out into an array.