[TYPO3] How to get table field in typoscript? - answered by other threads

Gary Wong gary.wong at spingroup.com
Thu Sep 20 17:06:10 CEST 2007


Looks like help from the two threads "simple calendar location" and 
"double data wrap possible?" answered my own question. 

Katja's last post before her solution )from support at typo3.us) was:

Katja wrote:
> Now trying to make it dynamic and change the name according to the 
> chosen record:
>
> location = TEXT
> location {
> data = DB : tx_desimplecalendar_location: {GPvar:myuid} : name
> data.wrap3 = {|}
> data.insertData = 1					
> }
>
> and in the place of the "myuid" I've tried:
>
> uid, tx_desimplecalendar_location_uid, location_uid, location_id
>
> But none of these works.
>   

The solution I believe is answered by the "Double datawrap possible?" 
thread by Tim Kleigrewe...

Tim wrote:
> great, works with a wrap3! (why ever)
>
>  pidInList {
>      dataWrap = DB : tx_myext_table : {GPvar:myuid}  : myfield
>      wrap3 = {|}
>      insertData = 1
>  }

So if you're still interested, Katja, I think the code that will work 
for you is:

location = TEXT
location {
dataWrap = DB : tx_desimplecalendar_location: {GPvar:myuid} : name
   data.wrap3 = {|}
   data.insertData = 1					
}


And as for my thread (see below), my solution is similar:

getemail=TEXT
getemail {
    dataWrap=DB: tx_mytable:{GPvar:uid}:email
    wrap3 = {|}   
    insertData=1
}

Now, my next question is, what is "wrap3"???  I looked into TSRef and it 
says "see wrap".   Google search didn't come up with much except that 
others are using it.
Can someone enlighten me?

Thank you all,
Gary Wong

Gary Wong wrote:
> I've been hacking at typoscript for a while, but still so much to 
> learn.  Can someone shed a light on how to do this:
>
> I have a custom table (tx_mytable) with an email field in it.
> I have a mailformplus plugin on a page and an extended template on it to 
> configure the mailformplus plugin.
> I want to assign the default email admin recipient to an email from a 
> record in my custom table based on a GET variable representing the UID 
> of the custom record passed into that page.
> This, of course, won't work.
>
> -----------------------
> temp.getemail=TEXT
> temp.getemail {
>     table=tx_mytable
>     select.where= {global:HTTP_GET_VARS|uid}
>     field=email
> }
>
> plugin.tx_thmailformplus_pi1.default.email_to < temp.getemail
> -----------------------
>
> But it's logistically what I'd like to do.  Anyone?
>
> Thank you in advance,
> Gary
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>   




More information about the TYPO3-english mailing list