CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Feature #9729

Feature: Hook for adding data before displaying [attached]

Added by Soren Malling over 2 years ago. Updated over 2 years ago.

Status:Needs Feedback Start date:2010-09-15
Priority:Could have Due date:
Assignee:Martin Ficzel % Done:

100%

Category:Frontend
Target version:-
Votes: 0

Description

This is a feature request, with a attached diff

For the different views, you might want to add/edit data (eg. contact persons based on instance) to be shown.

For this purpose I've added 3 hooks into the function showNodeInfo() inside EXT:caretaker/pi_base/class.tx_caretaker_pibase.php

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['nodeMarkersData']
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['childMarkersData']
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['rootlineMarkersData']

foreach part of the template rendering.

Attached extension gives a working example. Add the following TypoScript to your template, after you've added the marker ###MYOWNFIELD### to your html template

plugin.tx_caretaker_pi_overview.childMarkers.MYOWNFIELD = TEXT
plugin.tx_caretaker_pi_overview.childMarkers.MYOWNFIELD {
    field = MYOWNFIELD
}
plugin.tx_caretaker_pi_overview.nodeMarkers.MYOWNFIELD < plugin.tx_caretaker_pi_overview.childMarkers.MYOWNFIELD
plugin.tx_caretaker_pi_overview.rootlineMarkers.MYOWNFIELD < plugin.tx_caretaker_pi_overview.childMarkers.MYOWNFIELD

To see the marker ###MYOWNFIELD### be replaced with the text "my own data from somewhere" as written in the function additionalData (look in ext_localconf.php)

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['nodeMarkersData'][$_EXTKEY] = 'EXT:dkm_caretaker/class.tx_dkmcaretaker_hooks.php:&tx_dkmcaretaker_hooks->additionalData';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['childMarkersData'][$_EXTKEY] = 'EXT:dkm_caretaker/class.tx_dkmcaretaker_hooks.php:&tx_dkmcaretaker_hooks->additionalData';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['rootlineMarkersData'][$_EXTKEY] = 'EXT:dkm_caretaker/class.tx_dkmcaretaker_hooks.php:&tx_dkmcaretaker_hooks->additionalData';

feature_marker_data_hook.diff (2 kB) Soren Malling, 2010-09-15 00:30

T3X_dkm_caretaker-0_0_0-z-201009150024.t3x (2.6 kB) Soren Malling, 2010-09-15 00:30

History

Updated by Martin Ficzel over 2 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Martin Ficzel
  • Priority changed from Should have to Could have

I will review the patch and probably add add the hook to tx_caretaker_pibase.

Do you intend to add your own data to the rendering process or du you just need some extra marks to render data that is already there? In that case i would suggest to make the markers more flexible and allow TypoScript to add new markers instead of adding the hooks. Would that fit your needs?

Regards Martin

Also available in: Atom PDF