2 namespace TYPO3\CMS\Frontend\ContentObject;
32 public function render($conf = array())
37 $markerWrap = isset($conf[
'markerWrap.']) ? $this->cObj->stdWrap($conf[
'markerWrap'], $conf[
'markerWrap.']) : $conf[
'markerWrap'];
39 $markerWrap =
'### | ###';
41 list($PRE, $POST) = explode(
'|', $markerWrap);
45 $content = $this->cObj->cObjGetSingle($conf[
'template'], $conf[
'template.'],
'template');
46 $workOnSubpart = isset($conf[
'workOnSubpart.']) ? $this->cObj->stdWrap($conf[
'workOnSubpart'], $conf[
'workOnSubpart.']) : $conf[
'workOnSubpart'];
48 $content = $this->cObj->getSubpart($content, $PRE . $workOnSubpart . $POST);
51 if ($conf[
'relPathPrefix']) {
53 $content = $htmlParser->prefixResourcePath($conf[
'relPathPrefix'], $content, $conf[
'relPathPrefix.']);
56 $nonCachedSubst = isset($conf[
'nonCachedSubst.']) ? $this->cObj->stdWrap($conf[
'nonCachedSubst'], $conf[
'nonCachedSubst.']) : $conf[
'nonCachedSubst'];
58 if ($nonCachedSubst) {
60 if (is_array($conf[
'marks.'])) {
61 foreach ($conf[
'marks.'] as $theKey => $theValue) {
62 if (!strstr($theKey,
'.')) {
63 $content = str_replace($PRE . $theKey . $POST, $this->cObj->cObjGetSingle($theValue, $conf[
'marks.'][$theKey .
'.'],
'marks.' . $theKey), $content);
68 if (is_array($conf[
'subparts.'])) {
69 foreach ($conf[
'subparts.'] as $theKey => $theValue) {
70 if (!strstr($theKey,
'.')) {
71 $subpart = $this->cObj->getSubpart($content, $PRE . $theKey . $POST);
73 $this->cObj->setCurrentVal($subpart);
74 $content = $this->cObj->substituteSubpart($content, $PRE . $theKey . $POST, $this->cObj->cObjGetSingle($theValue, $conf[
'subparts.'][$theKey .
'.'],
'subparts.' . $theKey),
true);
80 if (is_array($conf[
'wraps.'])) {
81 foreach ($conf[
'wraps.'] as $theKey => $theValue) {
82 if (!strstr($theKey,
'.')) {
83 $subpart = $this->cObj->getSubpart($content, $PRE . $theKey . $POST);
85 $this->cObj->setCurrentVal($subpart);
86 $content = $this->cObj->substituteSubpart($content, $PRE . $theKey . $POST, explode(
'|', $this->cObj->cObjGetSingle($theValue, $conf[
'wraps.'][$theKey .
'.'],
'wraps.' . $theKey)),
true);
94 if (is_array($conf[
'subparts.'])) {
95 foreach ($conf[
'subparts.'] as $theKey => $theValue) {
96 if (!strstr($theKey,
'.')) {
97 $subpart = $this->cObj->getSubpart($content, $PRE . $theKey . $POST);
99 $GLOBALS[
'TSFE']->register[
'SUBPART_' . $theKey] = $subpart;
100 $subparts[$theKey][
'name'] = $theValue;
101 $subparts[$theKey][
'conf'] = $conf[
'subparts.'][$theKey .
'.'];
107 if (is_array($conf[
'marks.'])) {
108 foreach ($conf[
'marks.'] as $theKey => $theValue) {
109 if (!strstr($theKey,
'.')) {
110 $marks[$theKey][
'name'] = $theValue;
111 $marks[$theKey][
'conf'] = $conf[
'marks.'][$theKey .
'.'];
116 if (is_array($conf[
'wraps.'])) {
117 foreach ($conf[
'wraps.'] as $theKey => $theValue) {
118 if (!strstr($theKey,
'.')) {
119 $wraps[$theKey][
'name'] = $theValue;
120 $wraps[$theKey][
'conf'] = $conf[
'wraps.'][$theKey .
'.'];
125 $subpartArray = array();
126 foreach ($subparts as $theKey => $theValue) {
128 $this->cObj->data[$this->cObj->currentValKey] =
$GLOBALS[
'TSFE']->register[
'SUBPART_' . $theKey];
130 $subpartArray[$PRE . $theKey . $POST] = $this->cObj->cObjGetSingle($theValue[
'name'], $theValue[
'conf'],
'subparts.' . $theKey);
133 $this->cObj->data[$this->cObj->currentValKey] =
'';
135 $markerArray = array();
136 foreach ($marks as $theKey => $theValue) {
137 $markerArray[$PRE . $theKey . $POST] = $this->cObj->cObjGetSingle($theValue[
'name'], $theValue[
'conf'],
'marks.' . $theKey);
140 $subpartWraps = array();
141 foreach ($wraps as $theKey => $theValue) {
142 $subpartWraps[$PRE . $theKey . $POST] = explode(
'|', $this->cObj->cObjGetSingle($theValue[
'name'], $theValue[
'conf'],
'wraps.' . $theKey));
145 $substMarksSeparately = isset($conf[
'substMarksSeparately.']) ? $this->cObj->stdWrap($conf[
'substMarksSeparately'], $conf[
'substMarksSeparately.']) : $conf[
'substMarksSeparately'];
146 if ($substMarksSeparately) {
147 $content = $this->cObj->substituteMarkerArrayCached($content, array(), $subpartArray, $subpartWraps);
148 $content = $this->cObj->substituteMarkerArray($content, $markerArray);
150 $content = $this->cObj->substituteMarkerArrayCached($content, $markerArray, $subpartArray, $subpartWraps);
154 if (isset($conf[
'stdWrap.'])) {
155 $content = $this->cObj->stdWrap($content, $conf[
'stdWrap.']);