Controllers

In this article:


    What is a controller?

    A controller is used to initialize a page's data in the system, e.g. a blog page. The controller is then used to form Collections or Entitys of data.

    For example, a blog page's data can be initialized through a controller, as shown below.

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

    As shown above, it is possible to determine whether a controller should use default parameters from the system and the URL (such as the ISO code and specific ID) by setting primary=true.

    Which controllers are available in the system?

    Use the code found below to show the controllers that are available in the system (opens in a pop-up window).

    
    {help}
    
    

    How do I retrieve data from the controller?

    When the controller is initialized, a Collection or an Entity is needed to get data out into an array. This will be covered further in the section collections and entities.