page = PAGE

page.10 = FLUIDTEMPLATE
page.10 {
    partialRootPath = EXT:t3template/Resources/Private/Partials/
    layoutRootPath = EXT:t3template/Resources/Private/Layouts/

    file = EXT:t3template/Resources/Private/Templates/Standard.html

    variables {
        backendlayout = TEXT
        backendlayout.data = pagelayout

        frontendlayout = TEXT
        frontendlayout {
            field = layout
        }

        /*
        backendlayout = CASE
        backendlayout {
            key.data = pagelayout

            pagets__1 = TEXT
            pagets__1.value = 1

            pagets__2 = TEXT
            pagets__2.value = 2

            default < .pagets__1
        }
        */

        content0 = CONTENT
        content0 {
            table = tt_content
            select.where = colPos = 0
            select.orderBy = sorting
        }

        content1 < .content0
        content1.select.where = colPos = 1
    }
}

page {
    headTag {
        cObject = TEXT
        cObject.value (
<head>

<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link rel="preconnect" href="//fonts.googleapis.com">
<link rel="dns-prefetch" href="//ajax.googleapis.com">
<link rel="preconnect" href="//ajax.googleapis.com">
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="preconnect" href="//cdnjs.cloudflare.com">
        )
    }

    meta {
        X-UA-Compatible = IE=edge,chrome=1
        X-UA-Compatible.httpEquivalent = 1

        viewport = width=device-width, initial-scale=1, shrink-to-fit=no

        #keywords.data = DB:pages:{$const.global.rootPid}:keywords
        #keywords.override.field = keywords
        keywords.data = page:keywords
        keywords.ifEmpty.data = levelfield :-1, keywords, slide

        #description.data = DB:pages:{$const.global.rootPid}:description
        #description.override.field = description
        description.data = page:description
        description.ifEmpty.data = levelfield :-1, description, slide

        #author.data = DB:pages:{$const.global.rootPid}:author
        #author.override.field = author
        author.data = page:author
        author.ifEmpty.data = levelfield :-1, author, slide

        #theme-color = #FF6600

        robots = index, follow
        googlebot = index, follow
    }

    headerData {
        5 < lib.browserredirect
        5.insertData = 1

        10 = TEXT
        10.field = seo_title // title // nav_title
        10.noTrimWrap (
!
<title>! | {$const.global.siteName}</title>
!
        )
        10.noTrimWrap.splitChar = !

#        20 < lib.hreflang
#        20.insertData = 1

#        30 < lib.canonical
#        30.insertData = 1

        40 = TEXT
        40.data = getIndpEnv:TYPO3_SITE_URL
        40.noTrimWrap (
|

<!--[if IE]><link rel="shortcut icon" href="|favicon.ico"><![endif]-->
|
        )

        50 = TEXT
        50.data = getIndpEnv:TYPO3_SITE_URL
        50.noTrimWrap (
|<link rel="icon" href="|favicon.png">
|
        )

        60 = TEXT
        60.value (

<script>
    (function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);
</script>

        )
    }

    includeCSS {
        #googlefonts = https://fonts.googleapis.com/css?family=Roboto:400,500,700
        #googlefonts.external = 1
        #googlefonts.disableCompression = 1
        #googlefonts.excludeFromConcatenation = 1

        #normalize = https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css
        #normalize.external = 1
        #normalize.disableCompression = 1
        #normalize.excludeFromConcatenation = 1

        bootstrapreboot = EXT:t3template/Resources/Public/Cdn/cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap-reboot.min.css
        #bootstrapreboot.external = 1
        bootstrapreboot.disableCompression = 1
##        bootstrapreboot.excludeFromConcatenation = 1

        bootstrapgrid = EXT:t3template/Resources/Public/Cdn/cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap-grid.min.css
        #bootstrapgrid.external = 1
        bootstrapgrid.disableCompression = 1
##        bootstrapgrid.excludeFromConcatenation = 1

        #aos = https://cdnjs.cloudflare.com/ajax/libs/aos/2.2.0/aos.css
        #aos.external = 1
        #aos.disableCompression = 1
        #aos.excludeFromConcatenation = 1

        #animate = https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css
        #animate.external = 1
        #animate.disableCompression = 1
        #animate.excludeFromConcatenation = 1

        10 = EXT:t3template/Resources/Public/Css/main.css
        11 = EXT:t3template/Resources/Public/Css/additional.min.css
    }

    includeJSLibs {
        jquery = EXT:t3template/Resources/Public/Cdn/ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
        jquery.forceOnTop = 1
        #jquery.external = 1
        jquery.disableCompression = 1
##        jquery.excludeFromConcatenation = 1

        #modernizr = https://cdn.jsdelivr.net/modernizr/3.3.1/modernizr.min.js
        #modernizr.external = 1
        #modernizr.disableCompression = 1
        #modernizr.excludeFromConcatenation = 1

        picturefill = EXT:t3template/Resources/Public/Cdn/cdnjs.cloudflare.com/ajax/libs/picturefill/3.0.3/picturefill.min.js
        #picturefill.external = 1
        picturefill.disableCompression = 1
##        picturefill.excludeFromConcatenation = 1
    }

    includeJS {
        #5 = EXT:t3template/Resources/Public/JavaScript/browserredirect.js
        10 = EXT:t3template/Resources/Public/JavaScript/functions.js
        #20 = EXT:t3template/Resources/Public/JavaScript/ipdata.js
        #30 = EXT:t3template/Resources/Public/JavaScript/browserswitch.js
        40 = EXT:t3template/Resources/Public/JavaScript/entityswitch.js
    }

    includeJSFooterlibs {
        #svg4everybody = https://cdnjs.cloudflare.com/ajax/libs/svg4everybody/2.1.9/svg4everybody.min.js
        #svg4everybody.external = 1
        #svg4everybody.disableCompression = 1
        #svg4everybody.excludeFromConcatenation = 1

        matchheight = EXT:t3template/Resources/Public/Cdn/cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.2/jquery.matchHeight-min.js
        #matchheight.external = 1
        matchheight.disableCompression = 1
##        matchheight.excludeFromConcatenation = 1

        is = EXT:t3template/Resources/Public/Cdn/cdnjs.cloudflare.com/ajax/libs/is_js/0.9.0/is.min.js
        #is.external = 1
        is.disableCompression = 1
##        is.excludeFromConcatenation = 1

        #feature = https://cdnjs.cloudflare.com/ajax/libs/feature.js/1.0.1/feature.min.js
        #feature.external = 1
        #feature.disableCompression = 1
        #feature.excludeFromConcatenation = 1

        #parallax = https://cdnjs.cloudflare.com/ajax/libs/parallax.js/1.5.0/parallax.min.js
        #parallax.external = 1
        #parallax.disableCompression = 1
        #parallax.excludeFromConcatenation = 1

        #aos = https://cdnjs.cloudflare.com/ajax/libs/aos/2.2.0/aos.js
        #aos.external = 1
        #aos.disableCompression = 1
        #aos.excludeFromConcatenation = 1

        #waypoints = https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js
        #waypoints.external = 1
        #waypoints.disableCompression = 1
        #waypoints.excludeFromConcatenation = 1

        #headroom = https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js
        #headroom.external = 1
        #headroom.disableCompression = 1
        #headroom.excludeFromConcatenation = 1

        #hyphenator = https://cdnjs.cloudflare.com/ajax/libs/Hyphenator/5.3.0/Hyphenator.min.js
        #hyphenator.external = 1
        #hyphenator.disableCompression = 1
        #hyphenator.excludeFromConcatenation = 1
    }

    includeJSFooter {
        10 = EXT:t3template/Resources/Public/JavaScript/init.js
        20 = EXT:t3template/Resources/Public/JavaScript/main.js
        #30 = EXT:t3template/Resources/Public/JavaScript/videoplayer.js
    }

    /*
    config {
        htmlTag_stdWrap {
            cObject = TEXT
            cObject.value = <html lang="de" class="no-js">
        }
    }
    */

    bodyTag >
    bodyTagCObject = CASE
    bodyTagCObject {
        key.data = pagelayout

        /*
        pagets__1 = TEXT
        pagets__1.stdWrap.dataWrap = <body id="page-{field:uid}">

        pagets__2 = TEXT
        pagets__2.stdWrap.dataWrap = <body id="page-{field:uid}" class="home">
        */

        pagets__1 = COA
        pagets__1 {
            10 = TEXT
            10.data = levelfield:0, uid
            10.dataWrap =  id="page-{TSFE:id}" class="be-user-{TSFE:beUserLogin} lang-{TSFE:sys_language_uid} root-|

            20 = TEXT
            20.data = levelfield:1, uid
            20.noTrimWrap = | parent-||

            30 = TEXT
            30.data = level:1
            30.noTrimWrap = | level-||

            40 = TEXT
            40.noTrimWrap = | be-layout-1|

            50 = TEXT
            50 {
                intval = 1
                data = page:layout
                noTrimWrap = | fe-layout-| |
            }

            60 = TEXT
            60.value = has-sub
            60.if.isTrue.numRows {
                table = pages
                where = pid=this
            }

            70 = TEXT
            70.value = no-sub
            70.if.negate = 1
            70.if.isTrue.numRows {
                table = pages
                where = pid=this
            }

            100 = TEXT
            100.value = "

            stdWrap.noTrimWrap = |<body |>|
        }

        pagets__2 < .pagets__1
        pagets__2 {
            40 = TEXT
            40.noTrimWrap = | be-layout-2|

            90 = TEXT
            90.noTrimWrap = | home|
        }

        pagets__3 < .pagets__1
        pagets__3 {
            40 = TEXT
            40.noTrimWrap = | be-layout-3|

            90 = TEXT
            90.noTrimWrap = | login|
        }

        default < .pagets__1
    }
}

[applicationContext matches "/^Development/"]
    page {
        meta {
            robots = noindex, follow
            googlebot = noindex, follow
        }
    }
[END]

[applicationContext matches "#^Production/Staging#"]
    page {
        meta {
            robots = noindex, follow
            googlebot = noindex, follow
        }
    }
[END]

[request.getNormalizedParams().getHttpHost() == 'my.weytec.com' || request.getNormalizedParams().getHttpHost() == 'my.weytec.com.local']
    page {
        headerData {
            10.noTrimWrap (
!<title>! | {$const.my.siteName}</title>
!
            )
        }
        meta {
            robots = noindex, follow
            googlebot = noindex, follow
        }
    }
[END]

[request.getNormalizedParams().getHttpHost() == 'gcs.weytec.com' || request.getNormalizedParams().getHttpHost() == 'gcs.weytec.com.local' || 41 in tree.rootLineIds]
    page {
        meta {
            robots = noindex, follow
            googlebot = noindex, follow
        }
    }
[END]

[page["uid"] == 1]
    #page.includeJSFooter.file100 = EXT:t3template/Resources/Public/JavaScript/home.js
[END]

[siteLanguage("languageId") == "1"]
    /*
    page {
        config {
            htmlTag_stdWrap {
                cObject = TEXT
                cObject.value = <html lang="en" class="no-js">
            }
        }
    }
    */
[END]