[TYPO3-dev] insertData feature in TS breaks Front end editing

Dmitry Dulepov [typo3] dmitry at typo3.org
Tue Jul 22 09:22:30 CEST 2008


Hi!

Ben van Kruistum wrote:
> First thanks for your appearance in the netherlands on the typo3 userday 
> in Utrecht :-)  and for your reply.

;) Btw, slides from productivity session are now available here:
http://www.slideshare.net/dulepov/personal-productivity/

I did not expect that it will be featured on home page by SlideShare team.

> Secondly, maybe I did not explain myself correctly so here I'll try it 
> again:
> 
> I want to use a wrapper for the content page.
> 
> page = PAGE
> page.stdWrap.insertData = 1
> page.stdWrap.wrap = <H1>{field:title}</H1>|
> page.10 < styles.content.get
> 
> If I use the above Typoscript and also use Frontend editing
> 
> admPanel.override {
>    edit = 1
>    edit.displayIcons = 1
> }
> 
> then the buttons for hiding or deleting are not working anymore cause 
> some javascript code is removed due the insertData() function.
> So this is all straight forward Typoscript, but this combination breaks 
> down front end editing.
> 
> Hopefully this describes my point better..

Yes, now I see :)

page.stdWrap works for the whole page. Or, more precise, it works on the whole page content. Therefore insertData will look for {} in the whole content.

I think you actually looking for one of these two:

page.stdWrap.dataWrap = <H1>{field:title}</H1>|

or

page.5 = TEXT
page.5.dataWrap = <H1>{field:title}</H1>

The second one looks better and more optimal from memory usage view (it does not have to copy the whole content inside dataWrap). The first one is different from insertData because it inserts data only to the string you specify (not to the wrapped content).

-- 
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
Latest article: http://typo3bloke.net/post-details/slides_from_productivity_session/




More information about the TYPO3-dev mailing list