Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用分页实现筛选器_Php_Typo3_Fluid_Extbase - Fatal编程技术网

Php 如何使用分页实现筛选器

Php 如何使用分页实现筛选器,php,typo3,fluid,extbase,Php,Typo3,Fluid,Extbase,打字3 9 如何为widget.paginate设置过滤器? 例如: ... ... 但这只适用于第一页-第二页会释放参数 下一个问题:如何为分页设置nextPageLink(ajax)?f:widget.link不工作: 谢谢:)最后,我找到了两种解决方案: 打字稿: 及 控制器:(通过方法参数或通过$this->request轻松访问) 或 ext_localconf.php 及 控制器: 流体/HTML: 解决方案1: 自己的普通HTML表单(不含FLUID/ViewHelper

打字3 9 如何为widget.paginate设置过滤器? 例如:


...
...
但这只适用于第一页-第二页会释放参数

下一个问题:如何为分页设置nextPageLink(ajax)?f:widget.link不工作:
谢谢:)

最后,我找到了两种解决方案:

打字稿: 及

控制器:(通过方法参数或通过$this->request轻松访问) 或 ext_localconf.php 及

控制器:


流体/HTML:

解决方案1: 自己的普通HTML表单(不含FLUID/ViewHelper):

多谢




对于这两种解决方案: 液体分页: (注:从类型3开始,10是addQueryStringMethod:‘POST’去润滑)

<f:form name="filter" controller="myController" pluginName="Plugin" action="list" method="POST">
    <f:if condition="{types}">
        <f:for each="{types}" as="type">
            <f:form.checkbox name="filter[types][]" value="{type.uid}" />
        </f:for>
    </f:if>
    ...

<f:widget.paginate objects="{myObject}" as="Objects" configuration="{itemsPerPage: 20, insertAbove: 1, insertBelow: 1, maximumNumberOfLinks: 10, addQueryString: 1, addQueryStringMethod: 'POST'}">...
plugin.tx_yourext_plugin.features.requireCHashArgumentForActionArguments = 0
public function listAction (int $ argument = 0) {...
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_yourext_plugin[argument]';
public function listAction() {
    $argument = $this->request->getArgument('argument');
<form action = '<f:uri.action action = "cunning" controller = "job"/>' method = "GET">
<select name = "tx_yourext_plugin [argument]">...
class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper {
    protected function renderHiddenReferrerFields () {
        return ";
    }

    protected function renderTrustedPropertiesField () {
        return ";
    }
}
<f:widget.paginate... configuration = "{... addQueryString: 'true', addQueryStringMethod: 'GET'}">
MyPlugin:
type: Extbase
extension: MyExtKeyNameSpace
plugin: PluginName
defaultController: 'Controller::list'
routes:
  # - { routePath: '/{page-label}-{page}', _controller: 'Controller::list', _arguments: {'page': '@widget_0/currentPage'} }
  # - { routePath: '/{type-label}-{type}', _controller: 'Controller::list', _arguments: {'type': 'pluginTypes'} }
  # - { routePath: '/{area-label}-{area}', _controller: 'Controller::list', _arguments: {'area': 'pluginAreas'} }
  # - { routePath: '/type-{type}/area-{area}', _controller: 'Controller::list', _arguments: {'type': 'pluginTypes', 'area': 'pluginAreas'} }
  - { routePath: '/{page-label}{page}/{type-label}{type}/{area-label}{area}', _controller: 'Controller::list', _arguments: {'page': '@widget_0/currentPage', 'type': 'pluginTypes', 'area': 'pluginAreas'} }
  - { routePath: '/{company_slug}/{plugin_slug}', _controller: 'Controller::show', _arguments: {'company_slug': 'company', 'plugin_slug': 'plugin'} }
defaults:
  page: ''
  type: ''
  area: ''
requirements:
  page: '\d+'
  type: '\d+'
  area: '\d+'
aspects:
  page: { type: StaticRangeMapper, start: '1', end: '100' }
  page-label: { type: LocaleModifier, default: 'page-', localeMap: [{ locale: 'en_.*', value: 'page-' }, { locale: 'de_.*', value: 'seite-' }] }
  company_slug: { type: 'PersistedAliasMapper', tableName: 'tt_address', routeFieldName: 'slug' }
  plugin_slug: { type: 'PersistedAliasMapper', tableName: 'tx_myextkey_domain_model_plugin', routeFieldName: 'slug' }
  type-label: { type: LocaleModifier, default: 'type-', localeMap: [] }
  area-label: { type: LocaleModifier, default: 'area-', localeMap: [] }