[TYPO3-english] typolink question: only filename (and not show path)

Henjo Hoeksma hphoeksma at stylence.nl
Thu Jun 18 13:25:31 CEST 2009


On 2009-06-18 12:43:47 +0200, Jigal van Hemert <jigal at xs4all.nl> said:

> Henjo Hoeksma wrote:
>> probably I overlook completely how to do this, but how can I have only 
>> the filename showing when using typoscript to link to a file?
>> 
>> Default it outputs the whole path + the file name...
> 
> You could do something clever with split...
> 
> 10 = TEXT
> 10 {
>    value = /a/b/c/de/fgh/ijk.txt
>    split {
>      token = /
>      cObjNum = 1 |*||*| 2
>      1.value >
>      2.current = 1
>    }
> }
> 
> This displays "ijk.txt"
> 
> Regards,

Hey,

this works when filling in the value by hand, but how then to retrieve 
the value's value from TV?

This works:
					<TypoScript>
<![CDATA[
	10 = TEXT
	10 {
value = fileadmin/documenten/support/Productsheets/Applicatiehosting.pdf
   split {
     token = /
     cObjNum = 1 |*||*| 2
     1.value >
     2.current = 1
   }
typolink.parameter.current = 1
		wrap = <div id="productsheet" class="pagelinks"><h4 
class="links_header">Download:</h4>|</div>
		typolink.target = _blank
		if {
			isTrue.current = 1
		}

}
	}

]]>
							</TypoScript>

This doesn't:
					<TypoScript>
<![CDATA[
	10 = TEXT
	10 {
#value = fileadmin/documenten/support/Productsheets/Applicatiehosting.pdf
   split {
     token = /
     cObjNum = 1 |*||*| 2
     1.value >
     2.current = 1
   }
typolink.parameter.current = 1
		wrap = <div id="productsheet" class="pagelinks"><h4 
class="links_header">Download:</h4>|</div>
		typolink.target = _blank
		if {
			isTrue.current = 1
		}

}
	}

]]>
							</TypoScript>
Any clues?

Thanks for your post!
-- 
Stylence | webdevelopment in style
www.stylence.nl



More information about the TYPO3-english mailing list