Reputation: 14671
With Kohana, using a Templating system, what is the correct way to link to the style sheets, javascript files and most importantly images?
Shall I add <?php echo url::base() ?>
in front of links? This surely does work but doesn't seem like the correct way to do things.
What is the correct way?
Upvotes: 1
Views: 1448
Reputation: 3257
DOCROOT
somewhere: DOCROOT/assets/images/
url::base().'assets/images/thing.png
url::site('assets/images/thing.png')
<base href="<?=url::base()?>
(then use normal relative links in your html)Upvotes: 4