[TYPO3-mvc] Getting rid of base wrap inside a controller action?
Braulio J. Solano-Rojas
braulio at solsoft.biz
Sun Oct 31 17:37:19 CET 2010
Hello Franz.
El 31/10/2010 05:03 a.m., Franz Koch escribió:
> 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...
> }
> }
Franz, thanks for your teaching! I think I was a little confused. I
actually don't need the page content, but that was the only way I
imagined to implement the requirements I had. I needed that in my main
menu one of the items was a modal window (instead of directing to a
page). That window obtains content using AJAX (I am using
http://www.prototype-ui.com/). Therefore I created a spacer in the menu
and added a configuration to spacers to open that window (which I think
is a little bit ugly because spacers are spacers, not links). Then I
created a "hidden in menu" page that was called by that window. I did
not realized at that moment that I did not need a page with the plugin
in it. :-(
Saludos,
B.
More information about the TYPO3-project-typo3v4mvc
mailing list