Feature #9729
Feature: Hook for adding data before displaying [attached]
| 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';
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