prototype(Neos.NodeTypes:Page) < prototype(Neos.Neos:Page) {
    head {
        titleTag = Newland.NeosCommon:TitleTag
        metaDescriptionTag = Newland.NeosCommon:MetaDescription
        openGraphMetaTags = Newland.NeosCommon:OpenGraphMetaTags

        meta = Neos.Fusion:Template {
            templatePath = 'resource://Newland.CityTheme/Private/Templates/Page/Default.html'
            sectionName = 'meta'
            appleIcon = ${q(node).closest("[instanceof Neos.Neos:Document][appleIcon][appleIcon != '']").property('appleIcon')}

            # Google Site Verification
            googleSiteVerification = ${q(site).property('googleSiteVerification')}
        }

        stylesheets.site = Neos.Fusion:Template {
            templatePath = 'resource://Newland.CityTheme/Private/Templates/Page/Default.html'
            sectionName = 'stylesheets'

            baseFontFamily = ${q(node).closest("[instanceof Neos.Neos:Document][baseFontFamily][baseFontFamily != '']").property('baseFontFamily')}
            baseBoldFontFamily = ${q(node).closest("[instanceof Neos.Neos:Document][baseBoldFontFamily][baseBoldFontFamily != '']").property('baseBoldFontFamily')}
            headingFontFamily = ${q(node).closest("[instanceof Neos.Neos:Document][headingFontFamily][headingFontFamily != '']").property('headingFontFamily')}
            headingFontSizeBase = ${q(node).closest("[instanceof Neos.Neos:Document][headingFontSizeBase][headingFontSizeBase != '']").property('headingFontSizeBase')}

            colors = ${Configuration.setting('Newland.CityTheme.design.colors')}
        }
    }

    body {
        templatePath = 'resource://Newland.CityTheme/Private/Templates/Page/Default.html'
        sectionName = 'body'

        // Returns 0 if there's only german
        // Uses getOtherNodeVariants() function from Node.php
        hasMultipleSiteDimensions = ${Array.length(site.otherNodeVariants) > 0}

        // Define font and color variables here again for tportal header
        baseFontFamily = ${q(node).closest("[instanceof Neos.Neos:Document][baseFontFamily][baseFontFamily != '']").property('baseFontFamily')}
        baseBoldFontFamily = ${q(node).closest("[instanceof Neos.Neos:Document][baseBoldFontFamily][baseBoldFontFamily != '']").property('baseBoldFontFamily')}
        headingFontFamily = ${q(node).closest("[instanceof Neos.Neos:Document][headingFontFamily][headingFontFamily != '']").property('headingFontFamily')}
        headingFontSizeBase = ${q(site).property('headingFontSizeBase')}
        colors = ${Configuration.setting('Newland.CityTheme.design.colors')}

        showBreadcrumbs = ${
            node.nodeType.name != 'Newland.CityTheme:FrontPage'
        }

        parts {
            mainMenu = Neos.Neos:Menu {
                templatePath = 'resource://Newland.CityTheme/Private/Templates/FusionObjects/MainMenu.html'

                activateUppercaseForHeadlines = ${q(site).property('activateUppercaseForHeadlines')}
            }

            languageNavigation = Neos.Neos:DimensionsMenu {
                templatePath = 'resource://Newland.CityTheme/Private/Templates/FusionObjects/LanguageNavigation.html'
                dimension = 'language'
            }

            languageNavigationInMenu = Neos.Neos:DimensionsMenu {
                templatePath = 'resource://Newland.CityTheme/Private/Templates/FusionObjects/LanguageNavigation.html'
                dimension = 'language'
                modifier = 'c-language-navigation--menu'
            }

            breadcrumbNavigation = Newland.NeosCommon:BreadcrumbMenu {
                templatePath = 'resource://Newland.CityTheme/Private/Templates/FusionObjects/BreadcrumbNavigation.html'
                renderHiddenInIndex = true
            }

            footerNavigation = Neos.Neos:Menu {
                entryLevel = 2
                templatePath = 'resource://Newland.CityTheme/Private/Templates/FusionObjects/FooterNavigation.html'
                maximumLevels = 1
                startingPoint = ${q(site).children('[uriPathSegment="footer"]').get(0)}
            }
        }

        content {
            main = Neos.Neos:PrimaryContent {
                nodePath = 'main'
            }

            live = Neos.Neos:Content {
                templatePath = 'resource://Newland.CityTheme/Private/Templates/FusionObjects/LiveOverlay.html'

                liveWeatherForecastCity = ${q(site).property('liveWeatherForecastCity')}
                liveWebcams = ${q(site).property('liveWebcams')}
                liveWebcamsLink = ${q(site).property('liveWebcamsLink')}
                liveWebcamsLink.@process.convertUris = Neos.Neos:ConvertUris
                liveWeatherLink = ${q(site).property('liveWeatherLink')}
                liveWeatherLink.@process.convertUris = Neos.Neos:ConvertUris
                liveEventsLink = ${q(site).property('liveEventsLink')}
                liveEventsLink.@process.convertUris = Neos.Neos:ConvertUris

                @cache {
                    mode = 'cached'
                    maximumLifetime = '300'

                    entryIdentifier {
                        site = ${site}
                        editPreviewMode = ${node.context.currentRenderingMode.name}
                    }

                    entryTags {
                        # Data is stored on the site node.
                        1 = ${Neos.Caching.nodeTag(site)}
                    }
                }
            }
        }

        searchButtons = Neos.Neos:ContentCollection {
            nodePath = ${q(site).children('searchButtons').property('_path')}
            collection = ${q(site).children('searchButtons').children()}
            attributes.class = 'c-search__keyword-list'
            tagName = 'ul'
        }

        searchButtonCount = ${q(site).children('searchButtons').children().count()}

        metaNavItems = Neos.Neos:ContentCollection {
            nodePath = ${q(site).children('metaNavItems').property('_path')}
            collection = ${q(site).children('metaNavItems').children()}
            attributes.class = 'c-meta-menu'
            tagName = 'ul'
        }

        metaNavItemCount = ${q(site).children('metaNavItems').children().count()}
        hasMetaNavItems = ${q(site).children('metaNavItems').children().count() > 0}

        footer {
            logos = Neos.Neos:ContentCollection {
                nodePath = ${q(site).children('partnerLogos').property('_path')}
                collection = ${q(site).children('partnerLogos').children()}
            }

            hasButtons = ${q(site).children('footerButtons').children().count() > 0}
            buttons = Neos.Neos:ContentCollection {
                nodePath = ${q(site).children('footerButtons').property('_path')}
                collection = ${q(site).children('footerButtons').children()}
                attributes.class = 'c-site-footer__buttons'
            }
        }

        searchPage = ${Configuration.setting('Newland.Toubiz.Search.Neos.sites.default.mainSearchPage')}

        heroTitle = ${q(node).property('heroTitle')}
        heroSubtitle = ${q(node).property('heroSubtitle')}
        heroImage = ${q(node).property('heroImage')}
        showHero = ${q(node).property('showHero')}
        heroVideo = ${q(node).property('heroVideo')}

        showIntro = true
        introTitle = ${q(node).property('introTitle')}
        introText = ${q(node).property('introText')}
        introText.@process.convertUris = Neos.Neos:ConvertUris

        showLiveMenu = ${q(site).property('showLiveMenu')}
        showDropdownMenu = ${q(site).property('showDropdownMenu')}
        hideLanguageMenu = ${q(site).property('hideLanguageMenu')}
        pageTitle = ${q(site).property('pageTitle')}
        logo = ${q(site).property('logo')}
        logoWhite = ${q(site).property('logoWhite')}
        logoTop = ${q(site).property('logoTop')}
        useDynamicHeaderHeight = ${q(site).property('useDynamicHeaderHeight')}

        companyName = ${q(site).property('companyName')}
        companyAddress = ${q(site).property('companyAddress')}
        companyPhone = ${q(site).property('companyPhone')}
        companyMail = ${q(site).property('companyMail')}

        footerTitleButtons = ${q(site).property('footerTitleButtons')}
        footerTitleLinks = ${q(site).property('footerTitleLinks')}

        footerLogo = ${q(site).property('footerLogo')}
        facebookLink = ${q(site).property('facebookLink')}
        instagramLink = ${q(site).property('instagramLink')}
        twitterLink = ${q(site).property('twitterLink')}
        youtubeLink = ${q(site).property('youtubeLink')}
        pinterestLink = ${q(site).property('pinterestLink')}

        activateUppercaseForHeadlines = ${q(site).property('activateUppercaseForHeadlines')}

        focusPoint = ${q(node).property('focusPoint')}

        heroDecoration = ${q(site).property('heroDecoration')}

        gridTeaserSilhouette = ${q(site).property('gridTeaserSilhouette')}

        design = ${Configuration.setting('Newland.CityTheme.design')}

        javascripts.site = Neos.Fusion:Template {
            templatePath = 'resource://Newland.CityTheme/Private/Templates/Page/Default.html'
            sectionName = 'bodyScripts'
        }

        # Site Tracking Properties - Analytics
        siteTrackingGaId = ${q(site).property('siteTrackingGaId')}

        # Site Tracking Properties - Tag Manager
        siteTrackingGtmId = ${q(site).property('siteTrackingGtmId')}
        siteTrackingAlwaysLoadTagManager = ${q(site).property('siteTrackingAlwaysLoadTagManager')}

        # Site Tracking Properties - Matomo
        siteTrackingMatomoHost = ${q(site).property('siteTrackingMatomoHost')}
        siteTrackingMatomoSiteId = ${q(site).property('siteTrackingMatomoSiteId')}
    }
}
