Themes webroot

65 weergaven
Naar het eerste ongelezen bericht

Łatata

ongelezen,
16 jan 2012, 14:54:4916-01-2012
aan Croogo
I created new theme but I can't get to my images/js/css files from /
app/views/themed/my_theme/webroot/
I've added line Options -MultiViews but it's not helped. Any ideas?

Łatata

ongelezen,
16 jan 2012, 14:57:3816-01-2012
aan Croogo
I can get to files in css folder but not in img folder ;(

Stefano Zoffoli

ongelezen,
17 jan 2012, 03:36:1617-01-2012
aan cro...@googlegroups.com
You have to use the helper $this->Html->webroot(); to access your theme assets.

Example:
To access a js file located in app/views/themed/my_theme/webroot/js/foo.js

echo '<script src="' . $this->Html->webroot('js/foo.js'); . '"></script>';

For better performance i suggest you to put your theme assets in this directory:
app/webroot/theme/my_theme/. webroot() method will find it automatically!

--
Dott. Stefano Zoffoli
Web Development & Internet Technologies

Librasoft Snc
http://www.librasoftsnc.it
Via della Luna, 13
47034 Forlimpopoli (FC)
Tel. +39 0543 424612
Fax +39 0543 424612


2012/1/16 Łatata <karol....@gmail.com>
--
You received this message because you are subscribed to the Croogo mailing list.
To post to this group, send email to cro...@googlegroups.com
To unsubscribe from this group, send email to
croogo+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/croogo?hl=en
Visit the official website at http://www.croogo.org

Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten