A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearSmarty not rendering images and css - page 1
User InfoPosts
Smarty not rendering images and css#1
So I made myself a little html/css template. And now I(m trying to actually use it with some PHP code however, it only renders text. The images and css arent there. Everything is in the templates/Default directory. Do i have to do something funky with my paths in the template?

posted date: 2009-04-11 02:30:00

Re: Smarty not rendering images and css#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-11 02:30:01

Re: Smarty not rendering images and css#3
you shoudl put your images in html/imgThen all image paths should start /img/

posted date: 2009-04-11 02:35:00

Re: Smarty not rendering images and css#4
Wow, that(s a weird question... :)Just check what URLs the browser requests when looking for the stylesheets/images. I think you will have to adjust paths that you use in your smarty template.

posted date: 2009-04-11 04:19:00

Re: Smarty not rendering images and css#5
Use firebug and see why the images don(t show up. You need to activate the "NET" tab and then you see all the requests being made when your browser requests the page. My guess is that the paths to CSS and images are incorrect.

posted date: 2009-04-11 05:06:00

Re: Smarty not rendering images and css#6
Or look at the HTML that is being output.

posted date: 2009-04-11 11:15:00

Re: Smarty not rendering images and css#7
Yes probably, sorry it is always a pain with linking images and css - seems simple, but isn(t always!!!Is there a space being create for where the images should be? If so, right click and see the path the image is calling in and make sure it is uploaded there.Otherwise, use a tool like firebug (firefox plugin) to find out where the css and images are being called in, or just right click and (view source of the page( then just make sure everything is being called in from the right place! If needs be, put direct urls for the images ie. www.mysite.com/templates/templatename/images/myimage.gif - just to make sure they are where you think they are!good luck

posted date: 2009-04-11 23:51:00

Re: Smarty not rendering images and css#8
Firebug can lie, I recommend actually using http live headers or Fiddler for this kind of thing.

posted date: 2009-04-12 00:03:00

Re: Smarty not rendering images and css#9
Hehe, Firebug lies? Got any examples?

posted date: 2009-04-12 02:45:00

select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.