I want to add the base_url to all internal links in blocks of text in my views, to help prevent content-scraping. My idea was to use something like a good equivalent of CodeIgniter's auto_link() helper for Zend Framework. Does it exist?
Asked
Active
Viewed 528 times
1 Answers
2
You should do that anyways. Use the baseUrl view helper.
<img src="<?= $this->baseUrl(); ?>/images/image.png" />
or
<img src="<?= $this->baseUrl('/images/image.png'); ?>" />
or
<img src="<?= $this->baseUrl() . '/images/image.png'; ?>" />

markus
- 40,136
- 23
- 97
- 142