Create typolink for PDF in typo3 OR Create typolink for image in typo3


  
Typolink for create link in typo3 custom extension

$this->cObject = t3lib_div::makeInstance('tslib_cObj');

$PDF['parameter'] = 'uploads/YOUR_PATH/jainish.pdf _blank active PDF';

$link =	$this->cObject->typolink('PDF', $PDF);

output :

<a class="active" target="_blank" title="PDF"
    href="uploads/YOUR_PATH/jainish.pdf">PDF</a>

OR you can use your own link for create typo link

like :

$PDF['parameter'] = 'https://jainishsenjaliya.wordpress.com
     _blank active Blog';

$link =	$this->cObject->typolink('My Blog', $PDF);

Output :

<a class="active" target="_blank" title="Blog" 
  href="https://jainishsenjaliya.wordpress.com">My Blog</a>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s