[TYPO3-mvc] Getting rid of base wrap inside a controller action?

Franz Koch typo3.RemoveForMessage at elements-net.de
Sun Oct 31 12:03:39 CET 2010


Hey,

> I am sorry if I explain my problems badly, english is not my mother
> tongue. What I meant is that TYPO3 wraps my AJAX inside this:
>
> <!-- CONTENT ELEMENT, uid:230/list [begin] -->
> <div id="c230" class="csc-default">
> <!-- Plugin inserted: [begin] -->
> <!-- Plugin inserted: [end] -->
> </div>
> <!-- CONTENT ELEMENT, uid:230/list [end] -->
>
> That's what I want to get rid of.
>
> I know I can do it with Typoscript (but for all the content elements in
> the website) doing this:
>
> tt_content.stdWrap.innerWrap >
>
> However I don't want to do that.
>
> Programmatically, the old way of doing what I want to do was not to use
> the function tslib_pibase::pi_wrapInBaseClass($content) when returning
> content from an extension. I can not see a parallel in extbase to
> achieve the same feature.

you know that these are two completely different things? The equivalent 
of "pi_wrapInBaseClass" is (AFAIK by default) done via layouts in 
extbase. If you cleaned the layout you're good.

You're now talking about <div id="c230" class="csc-default"> which is 
something completely different. This one is created by 
css_styled_content and has absolutely nothing to do with any other 
extension output.

> ajax = PAGE
> ajax {
>   typeNum = 1249058000
>   config {
>     disableAllHeaderCode = 1
>     xhtml_cleaning = 0
>     admPanel = 0
>   }
> }
>
> fourelements_reservations < ajax
> fourelements_reservations {
>     typeNum = 1287743646
>     10 < styles.content.get
> }

"10 < styles.content.get" is the main cause of your issue. Does you ajax 
request depend on page content, or should it only return content created 
by your extbase extension?

If it depends on page content, do this:
fourelements_reservations {
   10 < styles.content.get
   10.renderObj < tt_content
   10.renderObj.stdWrap.innerWrap >
}

If the later is the case, you don't need styles.content.get and just do 
the following:

fourelements_reservations {
   10 < tt_content.list.20.fourelementsreservations_pi1
   10 {
     settings ...
     allowedControllersAndActions...
   }
}

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list