<?php

    return [
        "type"           => "page",
        "model"          => "Entry",
        "label"          => "pages",
        "label_singular" => "page",
        "template"       => TRUE,
        "hierarchic"     => TRUE,
        "group"          => "general",
        "order"          => TRUE,
        //  "showSlug" => true,
        "showUri"        => TRUE,
        "search"         => [
            "primary"   => ["title"],
            "secondary" => ["content"],
            "display"   => [
                "title"   => "title",
                "content" => "content"
            ]
        ],
        "fields"         => [
            [
                "name"          => "title",
                "label"         => "title",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "blocks",
                "label"         => "Blocks",
                "type"          => "multiplePicker",
                "longList"      => TRUE,
                "allowInsert"   => TRUE,
                "objectTypes"   => ["blocks"],
                "order"         => TRUE,
                "maxSize"       => 32,
            ],
            [
                "name"          => "meta_title",
                "label"         => "[Meta] Title",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150",
                "placement"     => "sidebar",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE
            ],
            [
                "name"          => "meta_description",
                "label"         => "[Meta] Description",
                "type"          => "textArea",
                "maxLength"     => 300,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:300",
                "placement"     => "sidebar",
                "inList"        => FALSE,
                "search"        => FALSE,
                "sort"          => FALSE
            ],
            [
                "name"          => "metaImage",
                "label"         => "[Meta] Image",
                "type"          => "mediaPicker",
                "multiple"      => FALSE,
                "mediaType"     => "image",
                "placement"     => "sidebar"
            ],
        ],
        "actions"        => [
            "insert", "edit", "delete", "order"
        ],
        "templates"      => [
            'homepage' => [
                'id'   => 'homepage',
                'name' => 'Home Page',
                'view' => 'frontend.pages.homepage'
            ]
        ]
    ];
