<?php

return array(
    "type" => "page",
    "model" => "Entry",
    "label" => "pages",
    "label_singular" => "page",
    "template" => true,
    "hierarchic" => true,
    "group" => "general",
    "order" => true,
    "showUri" => true,
    "shareable" => "share", // none, share (default), global
    "subTypes" => [
        "general" => [
            "label" => "General"
        ],
        "landing" => [
            "label" => "Landing pages"
        ],
        "regional" =>  [
            "label" => "Regional pages"
        ]
    ],
    "search" => array(
        1 => array(
            "primary" => array("title", "header_title"),
            "secondary" => array("tagline", "content", "summary"),
            "display" => array(
                "title" => "title",
                "content" => "reference_summary|summary|tagline",
                "image_id" => "image"
            ),
            "relations" => [
                "blocks"
            ],
        ),
        2 => array(
            "primary" => array("title", "header_title"),
            "secondary" => array("tagline", "content", "summary"),
            "display" => array(
                "title" => "title",
                "content" => "tagline",
                "image_id" => "image"
            )
        )
    ),
    "fields" => array(
        array(
            "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,
            "blocksMode" => "also",
        ),
        array(
            "name" => "reference_summary",
            "label" => "Reference Summary",
            "type" => "textBox",
            "maxLength" => 220,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:220",
            "blocksMode" => "also",
        ),
        array(
            "name" => "header_title",
            "label" => "Header Title",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150"
        ),
        array(
            "name" => "tagline",
            "label" => "Tagline",
            "type" => "textBox",
            "maxLength" => 255,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:255"
        ),
        array(
            "name" => "content",
            "label" => "content",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),
        [
            "name"          => "blocks",
            "label"         => "Blocks",
            "type"          => "multiplePicker",
            "multiLanguage" => true,
            "longList"      => true,
            "allowInsert"   => true,
            "objectTypes"   => ["block"],
            "order"         => true,
            "blocksMode"    => "only",
            "duplicateRelated" => true
        ],
        array(
            "name" => "summary",
            "label" => "summary",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim|xss_clean",
            "validation" => ""
        ),
        array(
            "name" => "call_to_action",
            "label" => "call to action",
            "type" => "link",
            "multiLanguage" => true,
            "required" => false,
            "maxLabel" => 25,
            "objectTypes" => array("project", "page", "solution", "case_study")
        ),
        array(
            "name" => "codeEmbeds",
            "label" => "Code Embeds",
            "type" => "multiplePicker",
            "objectTypes" => array("code_embed"),
            "order" => true,
            "allowInsert" =>false,
            "blocksMode" => "also",
        ),
        array(
            "name" => "image",
            "label" => "image",
            "type" => "mediaPicker",
            "mediaType" => "image",
            "placement" => "sidebar",
            "blocksMode" => "also",
            /*
            "thumbnailSizes" => array(
                array("type" => "fit", "name" => "200x200", "width" => 200, "height" => 200),
                array("type" => "resize_noup", "name" => "600x600", "width" => 600, "height" => 600),
                array("type" => "fit", "name" => "1920x560", "width" => 1920, "height" => 560),
            )
            */
        ),
        array(
            "name" => "header_overlap",
            "label" => "Header overlaps content?",
            "type" => "checkBox",
            "placement" => "sidebar",
            "blocksMode" => "also",
        ),
        array(
            "name" => "no_sitemap",
            "label" => "Don't add to Sitemap",
            "type" => "checkBox",
            "placement" => "sidebar",
            "blocksMode" => "also",
        ),
        array(
            "name" => "no_index",
            "label" => "No Index",
            "type" => "checkBox",
            "placement" => "sidebar",
            "blocksMode" => "also",
        ),
        array(
            "name" => "no_cache",
            "label" => "No Cache",
            "type" => "checkBox",
            "placement" => "sidebar",
            "blocksMode" => "also",
        ),
        array(
            "name" => "sticky_cta_id",
            "label" => "Sticky Cta",
            "type" => "selectBox",
            "contentType" => "sticky_cta",
            "labelField" => "title",
            "validation" => "nullable|integer|min:1",
            "websites" => array(1),
            "placement" => "sidebar",
            "blocksMode" => "also",
            "multiLanguage" => true,
        ),
        array(
            "name" => "meta_title",
            "label" => "SEO - Title Tag",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150",
            "blocksMode" => "also",
        ),
        array(
            "name" => "meta_keywords",
            "label" => "SEO - Keywords",
            "type" => "textBox",
            "maxLength" => 150,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:150",
            "blocksMode" => "also",
        ),
        array(
            "name" => "meta_description",
            "label" => "SEO - Description",
            "type" => "textArea",
            "maxLength" => 300,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:300",
            "blocksMode" => "also",
        ),
        array(
            "name" => "metaImage",
            "label" => "SEO - Image",
            "type" => "mediaPicker",
            "mediaType" => "image",
            "placement" => "sidebar",
            "blocksMode" => "also",
            /*
            "thumbnailSizes" => array(
                array("type" => "fit", "name" => "200x200", "width" => 200, "height" => 200),
                array("type" => "resize_noup", "name" => "600x600", "width" => 600, "height" => 600),
                array("type" => "fit", "name" => "1920x560", "width" => 1920, "height" => 560),
            )
            */
        ),
    ),
    "actions" => array(
        "insert", "edit", "delete", "order", "configuration", "duplicate"
    ),
    "templates" => array(
        1 => array(
            'default' => array(
                'id'   => 'default',
                'name' => 'Default',
                'view' => 'frontend.templates.page.default',
                'contentType' => 'default_template_configuration'
            ),
            'blocks' => array(
                'id'   => 'blocks',
                'name' => 'Blocks Page',
                'view' => 'frontend.templates.page.blocks',
                'blocks' => true,
            ),
            'landing' => array(
                'id'   => 'landing',
                'name' => 'Landing Page (Blocks)',
                'view' => 'frontend.templates.page.landing',
                'blocks' => true,
            ),
            'search' => array(
                'id'   => 'search',
                'name' => 'Search',
                'view' => 'frontend.templates.page.search'
            ),
            'value_chain' => array(
                'id'   => 'value_chain',
                'name' => 'Why SPG - Value Chain',
                'view' => 'frontend.templates.page.value_chain',
                'contentType' => 'default_template_configuration'
            ),
            'sustainability_topics' => array(
                'id'   => 'sustainability_topics',
                'name' => 'Why SPG - Sustainability Topics',
                'view' => 'frontend.templates.page.sustainability_topics',
                'contentType' => 'default_template_configuration'
            ),
            'cop' => array(
                'id'   => 'cop',
                'name' => 'COP Landing Page',
                'view' => 'frontend.templates.page.cop'
            ),
            'team' => array(
                'id'   => 'team',
                'name' => 'Why SPG - Management Team',
                'view' => 'frontend.templates.page.team',
                'contentType' => 'team_template_configuration'
            ),
            'clients' => array(
                'id'   => 'clients',
                'name' => 'Why SPG - Notable Clients',
                'view' => 'frontend.templates.page.clients',
                'contentType' => 'notable_template_configuration'
            ),
            'thought_leadership' => array(
                'id'   => 'thought_leadership',
                'name' => 'Why SPG - Thought Leadership',
                'view' => 'frontend.templates.page.thought_leadership_list',
                'contentType' => 'default_template_configuration'
            ),
            'homepage' => array(
                'id'   => 'homepage',
                'name' => 'Home Page',
                'view' => 'frontend.templates.page.home',
                'contentType' => 'hp_template_configuration'
            ),
            'homepage2' => array(
                'id'   => 'homepage2',
                'name' => 'New Home Page',
                'view' => 'frontend.templates.page.home2',
                'contentType' => 'hp2_template_configuration'
            ),
            'projects' => array(
                'id'          => 'projects',
                'name'        => 'Projects',
                'view'        => 'frontend.templates.page.projects_list',
                'contentType' => 'projects_template_configuration',
                'blocks' => true,
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.projects_detail',
                'detailContentType' => 'project',
                'sitemapPrio' => "0.6"
            ),
            'news' => array(
                'id'          => 'news',
                'name'        => 'News',
                'view'        => 'frontend.templates.page.blocks',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.news_detail',
                'detailContentType' => 'news',
                'blocks' => true,
                'sitemapPrio' => "0.5"
            ),
            'clippings' => array(
                'id'          => 'clippings',
                'name'        => 'Clippings',
                'view'        => 'frontend.templates.page.clipping_list',
                'parameters'  => 0,
                'blocks' => true,
                'sitemapPrio' => "0.5"
            ),
            'publications' => array(
                'id'          => 'publications',
                'name'        => 'Publications',
                'view'        => 'frontend.templates.page.blocks',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.publication_detail',
                'detailContentType' => 'publication',
                'blocks' => true,
                'sitemapPrio' => "0.5"
            ),
            'events' => array(
                'id'          => 'events',
                'name'        => 'Events',
                'view'        => 'frontend.templates.page.blocks',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.events_detail',
                'detailContentType' => 'event_item',
                'blocks' => true,
                'sitemapPrio' => "0.6"
            ),
            'solutions' => array(
                'id'          => 'solutions',
                'name'        => 'Solutions',
                'view'        => 'frontend.templates.page.solutions',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.solutions_detail',
                'detailContentType' => 'solution',
                'sitemapPrio' => "0.8"
            ),
            'case_studies' => array(
                'id'   => 'case_studies',
                'name' => 'Case Studies',
                'view' => 'frontend.templates.page.case_studies',
                'contentType' => 'case_study_template_configuration',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.case_studies_detail',
                'detailContentType' => 'case_study',
                'sitemapPrio' => "0.7"
            ),
            'media_corner' => array(
                'id'          => 'media_corner',
                'name'        => 'Media Corner',
                'view'        => 'frontend.templates.page.blocks',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.media_corner_detail',
                'detailContentType' => 'press_release',
                'blocks' => true,
                'sitemapPrio' => "0.7"
            ),
            'contacts' => array(
                'id'          => 'contacts',
                'name'        => 'Contacts',
                'view'        => 'frontend.templates.page.contacts',
                'contentType' => 'contacts_template_conf'
            ),
            'climate_week' => array(
                'id'          => 'climate_week',
                'name'        => 'New York Climate Week',
                'view'        => 'frontend.templates.page.climate_week',
                'contentType' => 'climate_week_template_configuration'
            ),
            'sectors' => array(
                'id'          => 'sectors',
                'name'        => 'Sectors',
                'parameters'  => 1,
                'view'        => 'frontend.templates.page.blocks',
                'detailView'  => 'frontend.templates.page.sectors_detail',
                'detailContentType' => 'sector',
                'blocks'      => true,
                'sitemapPrio' => "0.6"
            ),
            'vacancies' => array(
                'id'          => 'vacancies',
                'name'        => 'Vacancies',
                'view'        => 'frontend.templates.page.vacancies_list',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.vacancy_detail',
                'contentType' => 'default_template_configuration',
                'sitemapPrio' => "0.5"
            ),
            'landing_page' => array(
                'id'   => 'landing_page',
                'name' => 'Landing Page',
                'view' => 'frontend.templates.page.landing_page',
                'contentType' => 'landing_page_cfg'
            ),
            'blog' => array(
                'id'          => 'blog',
                'name'        => 'Blog',
                'view'        => 'frontend.templates.page.blocks',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.blog_detail',
                'detailContentType' => 'blog_post',
                'blocks' => true,
                'sitemapPrio' => "0.6"
            ),
            'blog-list' => array(
                'id'          => 'blog-list',
                'name'        => 'Blog List',
                'view'        => 'frontend.templates.page.blog_list',
                'sitemapPrio' => "0.6"
            ),
            'blog-contributers' => array(
                'id'          => 'blog-contributers',
                'name'        => 'Blog Contributors',
                'parameters'  => 1,
                'detailView'  => 'frontend.templates.page.blog_author',
                'detailContentType' => 'blog_author',
                'sitemapPrio' => "0.5"
            ),
            'assessment-form' => array(
                'id'   => 'assessment-form',
                'name' => 'Assessment Form',
                'view' => 'frontend.templates.page.assessment'
            ),
            'climate_journey' => array(
                'id'   => 'climate_journey',
                'name' => 'Climate Journey Page',
                'view' => 'frontend.templates.page.climate_journey',
                'contentType' => 'journey_template_cfg'
            ),
        ),
        2 => array(
        )
    )
);

