Typo3 10.4.4 Gridelements 10.0.0 扩展不起作用

Typo3 10.4.4 Gridelements 10.0.0 extension not working

嘿,我是 typo3 的新手,我想建立一个网站。 我是 TYPO3 的 运行 版本 10.4.4,安装了 bootstrap 软件包。 我已尝试按照 https://docs.typo3.org/typo3cms/extensions/gridelements/stable/

上的指南进行操作

我已将 TypoScript 复制到我的模板设置中,但前端没有输出。 请记住,我是新手,所以我还不太了解 TypoScript。
那么我能做什么有什么想法吗?

编辑: 我想使用 GriElements 以便我可以在我的页面上创建我自己的布局。标准布局很好,但我需要比他们提供的更多的自由。

我可以在没有 GridElements 的情况下在前端获得输出,但是当我使用扩展时,只有 GridElements 块中的内容不会显示。如果我从该扩展的手册页上的示例中删除标准 TypoScript,我会收到一条错误消息,提示“糟糕,发生错误!代码:”,然后是每次我更新页面时都会更改的代码。

我的模板上的 TypoScript 如下所示:

page.includeCSS.1 = fileadmin/user_upload/template/css/fonts.css
page.includeCSS.theme = fileadmin/user_upload/template/css/custom-theme.scss


# plugin.tx_bootstrappackage._LOCAL_LANG.da.readmore = test (NOT WORKING)
# https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/ApiOverview/Internationalization/ManagingTranslations.html

page.meta.robots = noindex, nofollow
page.meta.robots.replace = 1
page.10.partialRootPaths.3 = fileadmin/user_upload/template/partials/ContentElements/
page.10.partialRootPaths.4 = fileadmin/user_upload/template/Partials/Page/
page.10.dataProcessing.10.levels = 3
page.includeJSFooterlibs.bootstrap_navbar = fileadmin/user_upload/template/js
page.includeJSFooterlibs.bootstrap_navbar = fileadmin/user_upload/template/js/navbar.js
lib.contentElement.partialRootPaths.20 = fileadmin/user_upload/template/partials/ContentElements/
lib.contentElement.partialRootPaths.20 = fileadmin/user_upload/template/Partials/ContentElements/



lib.gridelements.defaultGridSetup {
  // stdWrap functions being applied to each element

  columns {
    default {
      renderObj = COA
      renderObj {
        # You can use registers to i.e. provide different image settings for each column
        # 10 = LOAD_REGISTER
        20 =< tt_content

        # And you can reset the register later on
        # 30 = RESTORE_REGISTER
      }
    }
  }

  # if you want to provide your own templating, just insert a cObject here
  # this will prevent the collected content from being rendered directly
  # i.e. cObject = TEMPLATE or cObject = FLUIDTEMPLATE will be available from the core
  # the content will be available via fieldnames like
  # tx_gridelements_view_columns (an array containing each column)
  # or tx_gridelements_view_children (an array containing each child)
  # tx_gridelements_view_column_123 (123 is the number of the column)
  # or tx_gridelements_view_child_123 (123 is the UID of the child)

}

lib.tt_content.shortcut.pages = COA
lib.tt_content.shortcut.pages {
  10 = USER
  10 {
    userFunc = tx_gridelements_view->user_getTreeList
  }
  20 = CONTENT
  20 {
    table = tt_content
    select {
      pidInList.data = register:pidInList
      where = colPos >= 0
      orderBy = colPos,sorting
      orderBy.dataWrap = FIND_IN_SET(pid,'{register:pidInList}'),|
    }
  }
}

tt_content.shortcut.5 = LOAD_REGISTER
tt_content.shortcut.5 {
  tt_content_shortcut_recursive.field = recursive
}

tt_content.shortcut.20 {
  0 {
    tables := addToList(pages)
    conf.pages < lib.tt_content.shortcut.pages
  }
  1 {
    tables := addToList(pages)
    conf.pages < lib.tt_content.shortcut.pages
  }
}

tt_content.gridelements_pi1 >
tt_content.gridelements_pi1 = COA
tt_content.gridelements_pi1 {
  #10 =< lib.stdheader
  20 = COA
  20 {
    10 = USER
    10 {
      userFunc = tx_gridelements_view->main
      setup {
        default < lib.gridelements.defaultGridSetup
      }
    }
  }
}

我包括的静力学是:

Bootstrap Package: Full Pacakage (bootstrap_package)
Bootstrap Package: Bootstrap 4.x (SCSS) (bootstrap_package)
XML Sitemap (seo)
Gridelements w/DataProssing (recommended) (gridelements)
Gallery (bm_image_gallery)

编辑2: 带有数据处理的新 TypoScript

lib.gridelements.defaultGridSetup =< lib.contentElement
lib.gridelements.defaultGridSetup {
  templateName.field = tx_gridelements_backend_layout
  templateName.ifEmpty = GridElement
  layoutRootPaths {
    1 = EXT:gridelements/Resources/Private/Layouts/
  }
  partialRootPaths {
    1 = EXT:gridelements/Resources/Private/Partials/
  }
  templateRootPaths {
    1 = EXT:gridelements/Resources/Private/Templates/
  }
  dataProcessing {
    10 = GridElementsTeam\Gridelements\DataProcessing\GridChildrenProcessor
    10 {
      default {
        as = children
        # Default options of the grid children processor
        # Change them according to the needs of your layout
        # Read more about it in the TypoScript section of the manual
        # options {
          # sortingDirection = ASC
          # sortingField = sorting
          # recursive = 0
          # resolveFlexFormData = 1
          # resolveBackendLayout = 1
          # respectColumns = 1
          # respectRows = 1
        # }
      }
    }
  }
}

我的包括:

Fluid Contetn Elements (fluid_styled_content)
Fluid Contetn Elements CSS (fluid_styled_content)
Bootstrap Package: Full Pacakage (bootstrap_package)
Bootstrap Package: Bootstrap 4.x (SCSS) (bootstrap_package)
XML Sitemap (seo)
Gridelements w/DataProssing (recommended) (gridelements)
Gallery (bm_image_gallery)

我得到的错误:

Tried resolving a template file for controller action "Standard->3" in format ".html", but none of the paths contained the expected template file (Standard/3.html). The following paths were checked: /httpdocs/typo3conf/ext/bootstrap_package/Resources/Private/Templates/ContentElements/, /httpdocs/typo3conf/ext/gridelements/Resources/Private/Templates/

您可能错过了包含 gridelemnts 的静态模板。为此,在顶部“Info/Modify”的下拉菜单中编辑 TS-Root-Template、select,点击“编辑整个模板记录”按钮,转到“包含”选项卡和 select gridelements 静态设置在右边的 Multiselect 框中。

请提供更多信息:

  • 您包含了哪些静态模板?也许你忘了包括 fluid_styled_content?
  • 您的 Typoscript/Flexform 设置如何?
  • 你需要网格元素做什么?

编辑:bootstrap_package 过去与 gridelements 的结合不是很好。也许您应该先尝试安装 Benjamin Knott 的扩展 autogrids (see this issue on github 以获取更多信息)

编辑 2:试试这个 Typoscript,它只是围绕所有元素包装一个部分,但也许你会在前端看到你的内容:

tt_content.gridelements_pi1.20.10.setup {
    section < lib.gridelements.defaultGridSetup
    section {
        wrap >
        dataWrap = <section id="c{field:uid}">|</section>
    }
}

已解决: 我安装了一个名为“bootstrap 的网格”的扩展程序,并将其包含在模板中并且有效。

感谢你们提供的所有帮助!

我认为你的问题出在你的 gridelemnts 流畅代码上,你可能没有使用正确的语法。