[TYPO3-dev] insertData feature in TS breaks Front end editing
Ben van Kruistum
ben at wulf.nl
Mon Jul 21 23:08:17 CEST 2008
"Dmitry Dulepov [typo3]" <dmitry at typo3.org> schreef in bericht
news:mailman.1.1216669092.12933.typo3-dev at lists.netfielders.de...
> Hi!
>
> Ben van Kruistum wrote:
>> Eventually it turned out that when setting page.stdWrap.insertData = 1 in
>> my TS this problem occured. Digging into the code I found the function
>> insertData in class.tslib_content.php that causes it. This function
>> replaces all text between curly braces with a match from the original
>> value. So normally it expects {field:title} and the results from this is
>> used, javascript functions that are parsed through this function are also
>> affected resulting in the given problem above (All javascript code
>> between curly braces is removed).
>
> You do not need to digg to the source code. Everything is perfectly
> described in TSRef on typo3.org.
>
>> I don't know if it is recommended to use page.stdWrap.insertData, in my
>> case it was only for some quick and dirty tests, but I could imagine that
>> I could have used it for same reason somewhere else.
>
> Short answer: if you use something, you should know why you are doing it.
> If you just randomly pressing buttons, once you can press a big red one...
Hi Dmitry,
First thanks for your appearance in the netherlands on the typo3 userday in
Utrecht :-) and for your reply.
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..
Ben.
>
> --
> Dmitry Dulepov
> TYPO3 Core team
> More about TYPO3: http://typo3bloke.net/
> Subscribe: http://typo3bloke.net/rss.xml
> Latest article:
> http://typo3bloke.net/post-details/nominate_me_as_typo3_mvp/
More information about the TYPO3-dev
mailing list