Forums » Themes and Public Display

Images in Theme Layouts

(3 posts)
  • Started 4 months ago by kyleroth
  • Latest reply from kyleroth

Tags:

  1. 4 months ago # | |

    I am building a theme and I just wondered if there is a way to add images to the page templates with a path to the theme? I know that I can put images into the CSS documents as background images, but some of the images need to be in the layout. I checked the paths.php file and could not find a variable for the path to the current selected theme there. I have also searched through the available themes to see if I could find an example of this, but I could not.

    Please advise.

  2. 4 months ago # | |

    Hi, you can get the URL to an image by using the img() helper function. Step 1 is to put the image in your images/ directory in your theme, then put an <img src="<?php echo img('whatever.gif'); ?>" /> where you want the image to show up in your theme.

  3. 4 months ago # | |

    Thanks, Kris!

RSS feed for this topic

Reply

You must log in to post.