[TYPO3] Insert Records typoscript snippet for direct mail

Roger Bunyan roger at redgumweb.com.au
Fri Jun 6 05:47:46 CEST 2008


Hi all

Just thought someone might find this bit of typoscript useful

I had to create a direct mail newsletter that comprised, normal text 
elements and a list of news items (manually sorted) with  and a list of 
products links to single view.

using the TS below I am able to collect a series of tt_news items in an 
Insert Record content element and have them display as a news list with 
links to single view.

I have used it with tt_news and tx_trade extensions but should work with 
most tables that you can select in Insert Records

hope someone else find it useful	


tt_content.shortcut.20.0.conf.tt_news=COA
tt_content.shortcut.20.0.conf.tt_news {
	wrap=<table border="0" cellpadding="0" cellspacing="0" 
width="100%">|</table><br>
	5=TEXT
	5.value=<tr><td valign="top">
	10=TEXT
	10.field= title
	10.wrap=<strong>|</strong><br>
	10.typolink {
         	parameter={$shortcut.conf.tt_news.pid}
 
additionalParams=&tx_ttnews[backPid]=95&tx_ttnews[tt_news]={field:uid}
               	additionalParams.insertData = 1
               	#no_cache=1
               	useCacheHash=1
               }
     	20=TEXT
       	20 {
             	field=short
             	ifEmpty.field = bodytext
             	#parseFunc < lib.parseFunc
             	crop=150
             	wrap=|&nbsp;
             }
       	25=TEXT
       	25.value=[more]
     	25.stdWrap.typolink{
         	parameter={$shortcut.conf.tt_news.pid}
 
additionalParams=&tx_ttnews[backPid]=95&tx_ttnews[tt_news]={field:uid}
               	additionalParams.insertData = 1
               	#no_cache=1
               	useCacheHash=1
               }
	29=TEXT
	29.value=</td><td valign="top" width="100">
     	50=IMAGE
     	50{
                 # only output it if not empty
               	stdWrap.required=1
             	wrap=|
             	stdWrap.typolink{
             		parameter={$shortcut.conf.tt_news.pid}
               	 
additionalParams=&tx_ttnews[backPid]=95&tx_ttnews[tt_news]={field:uid}
                   	additionalParams.insertData = 1
               		#no_cache=1
               		useCacheHash=1
			}

       		file.import=uploads/pics/
       		file.import.field=image
       		file.maxW=100
       		file.maxH=100
       		file.import.listNum=0
     	}
     	55=TEXT
	55.value=</td></tr>
}


tt_content.shortcut.20.0.conf.tx_trade_products=COA
tt_content.shortcut.20.0.conf.tx_trade_products{
	10=TEXT
	10.field= title
	10.wrap=<strong>|</strong><br>
	10.typolink {
         	parameter={$shortcut.conf.tx_trade_products.pid}
 
additionalParams=&tx_trade_pi1[cmd]=singleview&tx_trade_pi1[uid]={field:uid}
               	additionalParams.insertData = 1
               	no_cache=1
               }

	15=TEXT
	15.value=<table border="0" cellpadding="0" cellspacing="0" 
width="98%"><tr><td valign="top">
     	20=TEXT
       	20 {
             	field=subheader
             	ifEmpty.field = description
             	#parseFunc < lib.parseFunc
             	crop=150
             	wrap= |&nbsp;
             }
       	25=TEXT
       	25.value=[more]
     	25.stdWrap.typolink{
         	parameter={$shortcut.conf.tx_trade_products.pid}
 
additionalParams=&tx_trade_pi1[cmd]=singleview&tx_trade_pi1[uid]={field:uid}
               	additionalParams.insertData = 1
               	no_cache=1
               }
         29=TEXT
         29.value=<td>

     	50=IMAGE
     	50{
                 # only output it if not empty
               	stdWrap.required=1
             	wrap=|
             	stdWrap.typolink{
         		parameter={$shortcut.conf.tx_trade_products.pid}
           	 
additionalParams=&tx_trade_pi1[cmd]=singleview&tx_trade_pi1[uid]={field:uid}
                   	additionalParams.insertData = 1
                   	no_cache=1
			}

       		file.import=uploads/pics/
       		file.import.field=image
       		file.maxW=50
       		file.maxH=50
     	}
     	59=TEXT
     	59.value=</td></tr></table><br>

}





-- 
Roger Bunyan
Redgum Web
http://redgumweb.com.au
ph: 02 6492 7202
Sustainability will be achieved by a
cultural change, not by technology.


More information about the TYPO3-english mailing list