Skip to content

Instantly share code, notes, and snippets.

@Sebobo
Created May 3, 2017 17:17
Show Gist options
  • Save Sebobo/92777d6ac9d8a2dcb96f1965dcd22dc0 to your computer and use it in GitHub Desktop.
Save Sebobo/92777d6ac9d8a2dcb96f1965dcd22dc0 to your computer and use it in GitHub Desktop.
TYPO3 pagination widget without a controller
<h1>{title}</h1>
<f:widget.paginate objects="{content}" as="paginatedContent" configuration="{itemsPerPage: 2}">
<ul>
<f:for each="{paginatedContent}" as="content">
<li>{content.data.uid} {content.data.CType}</li>
</f:for>
</ul>
</f:widget.paginate>
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array(
'_DEFAULT' => array(
'init' => array(
'enableCHashCache' => 1,
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => 1,
'enableUrlEncodeCache' => 1,
'postVarSet_failureMode' => '',
),
'redirects' => array(),
'preVars' => array(
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'nc' => 1,
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'L',
'valueMap' => array(
# 'de' => '0',
'en' => '1',
),
'valueDefault' => 'de',
'noMatch' => 'bypass',
),
),
'pagePath' => array(
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => 7,
'rootpage_id' => 1,
'firstHitPathCache' => 1,
),
'fixedPostVars' => array(),
'postVarSets' => array(
'_DEFAULT' => array(
'page' => array(
array(
'GETvar' => 'tx_website_gridtile[@widget_0][currentPage]',
),
),
),
),
),
);
lib.contentElement {
templateRootPaths {
200 = EXT:website/Resources/Private/Templates/
}
}
tt_content {
website_gridtile < lib.contentElement
website_gridtile {
templateName = Demo
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
10 {
table = tt_content
where.data = field:uid
orderBy = sorting
as = content
}
}
extbase {
pluginName = Demo
controllerName = Demo
controllerExtensionName = website
controllerActionName = show
}
}
}
config.no_cache = 1
config.tx_realurl_enable = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment