kathep Posted August 13, 2015 Share Posted August 13, 2015 Err, heading should read 'Adding image to template via code' :\ Hi all I am trying to add an image to a template manually, via code. I want this image to appear on all pages using this template. Looking through the forums, I see many threads on adding images, but I couldn't find any suggestions that helped in my situation. I have tried: $remind = "<img src='http://kathep.com/site/templates/img/remind.png' type='image/png' width='400px'>"; $content = $remind; and $remind = "<img src='http://kathep.com/site/templates/img/remind.png'>"; $content = $remind; and, based on this post by Ryan $remind = $page->image = 'http://kathep.com/site/templates/img/remind.png'; $content = $remind; The path to the image is valid, but in each instance the image doesn't show up. Can you point out what I'm doing wrong? Link to comment Share on other sites More sharing options...
LostKobrakai Posted August 13, 2015 Share Posted August 13, 2015 Err, heading should read 'Adding image to template via code' :\ You can just edit the first post and choose "Use Full Editor" to edit the topic title. 1 Link to comment Share on other sites More sharing options...
kathep Posted August 13, 2015 Author Share Posted August 13, 2015 Thanks @LostKobrakai Link to comment Share on other sites More sharing options...
kathep Posted August 13, 2015 Author Share Posted August 13, 2015 UPDATE: Just got it to work using: $remind = "<img src='http://kathep.com/site/templates/img/remind.png'>"; $content = $remind; I discovered my FTP client (Transmit) was not updating my experiments due to a weird later timestamp on the remote copy of the file. There's nothing like posting to the forum to make things seem obvious that seemed unsolvable before posting. Hopefully documenting this simple noob error will help someone else 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now