Skip to content

Instantly share code, notes, and snippets.

@fjacobi
Last active October 7, 2016 14:16
Show Gist options
  • Save fjacobi/fddb247f3d5cf64262d117b46289bbfa to your computer and use it in GitHub Desktop.
Save fjacobi/fddb247f3d5cf64262d117b46289bbfa to your computer and use it in GitHub Desktop.
ke_search with Mask
<?php
// extend ke_search for mask content elements
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyPageContentFields'][] = 'Vendor\\Ext\\Hooks\\SearchExtension';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentFromContentElement'][] = 'Vendor\\Ext\\Hooks\\SearchExtension';
<?php
namespace Vendor/Ext/Hooks;
class SearchExtension
{
public function modifyPageContentFields(&$fields, $pObj)
{
$fields .= ', subheader, tx_mask_mask_rte';
}
public function modifyContentFromContentElement(&$bodytext, &$ttContentRow, $pObj)
{
$ttContentRow['header'] .= " " . $ttContentRow['subheader'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment