[TYPO3-templavoila] How to have content after DIV or in DIV but with no content deletion

Pawe³ Stanis³awczuk ps at todesign.pl
Tue Jul 18 12:03:09 CEST 2006


Hi,

About the first one:
I create new Data Element. Set Mapping Type: Element; Editing Type: 
TypoScript Object Path.
How to map it to <div id="menu"> to have it after closing tag to receive 
this:

<div id="menu">
    <div id="menu1"></div>
    <div id="menu2"></div>
</div>
<script type="text/javascript">
    /*<[CDATA[*/
     var menu = new FlashObject("index.swf", "menu", "100", "100", "6.0.0");
     menu.addParam("quality", "high");
     menu.addParam("menu", "true");
      menu.write("menu");
     /*]]>*/
 </script>


About the second part... I can't have it COA because I have multiple 
flashvars generated in TS from an extension. Just how to map my Element to 
have my js just after the opening tag of  menu div:

<div id="menu">
    <script type="text/javascript">
        /*<[CDATA[*/
        var menu = new FlashObject("index.swf", "menu", "100", "100", 
"6.0.0");
        menu.addParam("quality", "high");
        menu.addParam("menu", "true");
        menu.write("menu");
        /*]]>*/
    </script>
    <div id="menu1"></div>
    <div id="menu2"></div>
</div>


Greetings,
Pawe³ Stanis³awczuk
www.todesign.pl


U¿ytkownik "Dmitry Dulepov" <typo3 at accio.lv> napisa³ w wiadomo¶ci 
news:mailman.1.1153215571.32336.typo3-project-templavoila at lists.netfielders.de...
> "Pawe?????????????????????????????????" wrote:
>
> Please, do not start your text from "--". Thunderbird thinks it is a 
> signature and does let to quote it :(
>
>> <div id="menu">
>>     <div id="menu1"></div>
>>     <div id="menu2"></div>
>> </div>
>> <script type="text/javascript">
>
> Put /*<[CDATA[*/ here
>
>>     var menu = new FlashObject("index.swf", "menu", "100", "100", 
>> "6.0.0");
>>     menu.addParam("quality", "high");
>>     menu.addParam("menu", "true");
>>     menu.write("menu");
>
> Put /*]]>*/ here.
>
>> </script>
> >
>> Is it possible to do this with TemplaVoila?
>
> I do not understand the problem :(
>
>> Second question is how to put my js into DIV (just after the div line) 
>> but without TemplaVoila deleting the content:
>
> If you map "menu" as INNER, TV will always replace content. Personally I 
> would make lib.flashMenu a COA and add JS code inside COA. Something like:
>
> lib.flashMenu = COA
> lib.flashMenu {
>   10 = HTML
>   10.value (
> <script type="text/javascript">
> ....
> </script>
>   )
>   20 = ....
> }
>
> or even move JS to a separate file if possible.
>
> Dmitry.
> -- 
> "It is our choices, that show what we truly are,
> far more than our abilities." (A.P.W.B.D.) 





More information about the TYPO3-project-templavoila mailing list