<?php

return array(
    "type" => "page",
    "model" => "Entry",
    "label" => "pages",
    "label_singular" => "page",
    "template" => true,
    "hierarchic" => true,
    "group" => "general",
    "order" => true,
    //  "showSlug" => true,
    "showUri" => true,
    "search" => array(
            "primary" => array("title"),
            "secondary" => array("content"),
            "display" => array(
                "title" => "title",
                "content" => "content"
            )
        ),
    "fields" => array(           
        array(
            "name" => "title",
            "label" => "Título", 
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:150",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "header_template",
            "label" => "Header - Cabeçalho",
            "type" => "selectBox",
            "list" => array(
                "home" => "Home",
                "sust_simulator" => "Simulador da Sustentabilidade",
                "pension_simulator" => "Simulador de Pensões",
                "none" => "Sem Header"
            ),
            "preValidation" => "trim",
            "placement" => "sidebar",
            "validation" => "required",
        ),
        array(
            "name" => "content",
            "label" => "content", 
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim|xss_clean",
            "validation" => ""
        ),
        array(
            "name" => "pageSections",
            "label" => "Secções de Página",
            "type" => "multiplePicker",
            "objectTypes" => array("page_section"),
            "order" => true
        ),
        array(
            "name" => "archives",
            "label" => "Biblioteca",
            "type" => "multiplePicker",
            "objectTypes" => array("archive"),
            "order" => true
        )
    ),
    "actions" => array(
        "insert", "edit", "delete", "order"
    ),
    "templates" => array(
        'homepage' => array(
            'id'   => 'homepage',
            'name' => 'Home Page',
            'view' => 'frontend.pages.homepage'
        )
    )
);

