[TYPO3-english] change typoscript code in a DS using CASE to handle Typolink

Riccardo De Contardi riccardo.decontardi at bhuman.it
Mon Apr 26 10:04:44 CEST 2010


Hello everybody!

A little problem with

I use T3 4.3.3 and Templavoila (Last version); I've created an FCE with a  
link. The default DS for this link is:

<TypoScript>
	10 = TEXT
	10.typolink.parameter.current = 1
	10.typolink.returnLast = url
</TypoScript>


I'd like to change the behaviour in this way:

1. When the link is an internal page, prepend the baseURL to the page path
This is quite easy: I've changed the TS to this

<TypoScript>
10 = COA	
10{
	1 = TEXT
	1.data = getIndpEnv:TYPO3_SITE_URL	
	2 = TEXT
	2.typolink.parameter.current = 1
	2.typolink.returnLast = url	
}
</TypoScript>

2. When the link is an external page (I.E. http://www.google.it , then  
don't prepend anything

I'm pretty sure this could be done using the CASE instead of COA, but I've  
never used it before and I can't find useful examples googling around

Could you help me, please??


-- 
--------------------------------------------
Riccardo De Contardi - Web Developer
B Human Srl - www.bhuman.it
Via Canzio, 15 - 20131 Milano
TEL +39-02-20.23.271 - FAX +39-02-20.240.561
--------------------------------------------


More information about the TYPO3-english mailing list