Project

General

Profile

Actions

Bug #24049

closed

Backend modules are complicated to render

Added by Steffen Kamper about 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-11-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

To generate the page of a BE module you have to be carefully and it's not easy to concatenate it the right way.
Also many modules forget to call in last step the replace of JS and CSS markers.

When a module calls $this->doc->startPage, pageRenderer does a render. After this point you can't add something to pageRenderer anymore, which can lead to problems.

Solution:
Add a shortcut method "render" which does all these steps automatic and deliver the complete page.
This is the recommended way to render a BE module with docheader:

1) collect all content and fill markers with content and docheader items
2) call $this->doc->moduleBody to replace template with markers
3) call $this->docrender to complete the page

Example:

// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
    // Renders the module page
$this->content = $this->doc->render(
    $GLOBALS['LANG']->getLL('title'),
    $this->content
);

(issue imported from #M16383)


Files

16383.patch (21.8 KB) 16383.patch Administrator Admin, 2010-11-14 18:14
Actions

Also available in: Atom PDF