[TYPO3-dam] dam downloads setting target for download of a file
Karl-Ernst Kiel
kekiel at kekiel.de
Tue Nov 14 12:55:34 CET 2006
Nico Potvin wrote:
> i have been using dam_downloads for a while now, and i am wondering if
> it is possible to set the target of a link.
> now it uses target="_blank", but is it possible to set it to _self,
> _parent or top?
> it seems that this is hardcoded in the extension.
Hi Nico!
Yes, it is hardcoded :-(
It´s in "class.tx_damdownloads_pi1.php". Look for the "function
getWrappedSubparts($lConf)" and change the target in these lines:
#### provides a link to the original file
$wrappedSubparts['###LINK_DL_FILE###'] = array(
'<a href="'.$row['file_path'].urlencode($row['file_name']).'"
target="_blank">',
'</a>'
);
If you want to configure it via TS e.g.
plugin.tx_damdownloads_pi1.linktarget = myframe
you may want to change it this way:
#### provides a link to the original file
$linktarget = $this->conf['linktarget'] ? $this->conf['linktarget'] :
'_blank';
$wrappedSubparts['###LINK_DL_FILE###'] = array(
'<a href="'.$row['file_path'].urlencode($row['file_name']).'"
target="'.$linktarget.'">',
'</a>'
);
Greetings,
Karl-E.
More information about the TYPO3-project-dam
mailing list