2017-04-05 5 views
0

TYPO3에서 다른 프론트 엔드 레이아웃을 사용하려고합니다. 그래서이 멋진 TypoScript를 사용하고 있습니다.TYPO3의 다른 프론트 엔드 레이아웃

page { 
    bodyTag = <body> 

    10= CASE 
    10.key.field=layout 
    # Standardtemplate 
    10.0 = TEMPLATE 
    10.0.template = FILE 
    10.0.template.file = fileadmin/template/content_template.html 
    10.0.workOnSubpart = DOCUMENT_BODY 

    # Variante 1: 
    10.1 = TEMPLATE 
    10.1.template = FILE 
    10.1.template.file = fileadmin/template/index_template.html 
    10.1.workOnSubpart = DOCUMENT_BODY 

    includeJSFooter { 

    jquery = fileadmin/template/js/jquery.js 
    bootstrap = fileadmin/template/js/bootstrap.min.js 
    app = fileadmin/template/js/app.js 

    } 

    includeCSS { 

    robotoFont = https://fonts.googleapis.com/css?family=Roboto:100,400 
    robotoFont.external = 1 
    robotoFont.media = all 

    bootstrapCore = fileadmin/template/css/bootstrap.min.css 
    bootstrapCore.media = all 


    } 
} 

이것은 아직 작동하지 않습니다. 모든 단일 페이지가 완전합니다. 흰색 페이지 만 나타납니다. TYPO3 7.6.16을 사용하고 있습니다. 위의 코드에서 문제가 있습니까?

답변

0

PAGE-Element에 배치하고 경로의 이름을 바꾸고 레이아웃 1의 값으로 명명 된 일부 BackendLayouts을 만듭니다. 2. 3. 예. 이 도움이되기를 바랍니다 :

10 = FLUIDTEMPLATE 
    10 { 
      file = fileadmin/templates/Page/Standard.html 

      partialRootPath = fileadmin/templates/Partials/ 

      variables { 

        layout = CASE 
        layout { 
          key.field = backend_layout 
          key.ifEmpty.data = levelfield:-2, backend_layout_next_level, slide 

          1 = TEXT 
          1.value = startpage 

          2 = TEXT 
          2.value = subpage 

          3 = TEXT 
          3.value = subpagespecial 

          default = TEXT 
          default.value = subpage 
        } 

        content = CONTENT 
        content { 
          table = tt_content 
          select.orderBy = sorting 
          select.where = colPos=0 
          select.languageField = sys_language_uid 
          select.includeRecordsWithoutDefaultTranslation = 1 
        } 

        header = CONTENT 
        header { 
          table = tt_content 
          select.orderBy = sorting 
          select.where = colPos=1 
          select.languageField = sys_language_uid 
          select.includeRecordsWithoutDefaultTranslation = 1 
        } 
        content2 = CONTENT 
        content2 { 
          table = tt_content 
          select.orderBy = sorting 
          select.where = colPos=3 
          select.languageField = sys_language_uid 
          select.includeRecordsWithoutDefaultTranslation = 1 
        } 
        contentfull = CONTENT 
        contentfull { 
          table = tt_content 
          select.orderBy = sorting 
          select.where = colPos=2 
          select.languageField = sys_language_uid 
          select.includeRecordsWithoutDefaultTranslation = 1 
        } 
      } 
    } 
+0

:

<!-- ###DOCUMENT_BODY### begin --> Your HTML template <!-- ###DOCUMENT_BODY### end --> 

당신은 당신의 TypoScript 템플릿을 단순화 할 수/ – JonasLoerken

+0

내가 그것을 추천 할 것입니다. 사용하기 쉽고 미래 지향적이며 관리가 쉽습니다. 위키를 확인하십시오. https://wiki.typo3.org/T3Doc/Fluidtemplate_by_example – LittleHoopoe

0

CASE 개체에 기본 변형을 추가하십시오. 새롭게 작성된 페이지는 'layout'열에 '0'이 없기 때문일 수 있습니다.

subpart 마커의 철자가 올바른지 확인 했습니까? 나는 유체 - 템플릿을 사용하지 않는

page { 
    10 = TEMPLATE 
    10.template = FILE 
    10.template.file = CASE 
    10.template.file { 
     key.field = layout 
     default = TEXT 
     default.value = fileadmin/template/content_template.html 
     1 = TEXT 
     value = fileadmin/template/index_template.html 
    } 
    10.workOnSubpart = DOCUMENT_BODY 
}