Forums / General Questions / How to find path to active template files?

How to find path to active template files?

Locked

Views: 2,793

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
9 Apr 2009, 9:46 PM
#1
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

How to find path to active template files?

I am looking for the code that will get me the path to the active template files so i can include these files in some custom code.

For example. I have an image in my custom template images dir. What is the zen code to this image?

Thanks

Experience is what you get when you don’t get what you want…

9 Apr 2009, 9:57 PM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,187
Plugin Contributions:
0

Re: How to find path to active template files?

Kw,
src="your_template/images/the image name here.jpg"

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

9 Apr 2009, 10:36 PM
#3
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: How to find path to active template files?

Thanks, but that isn't quite what I'm looking for. I don't want to hardcode my template name.

I'm looking more alone this line:

HTTP_SERVER . DIR_WS_TEMPLATE . ????? . '/images/myimage.jpg';

Experience is what you get when you don’t get what you want…

9 Apr 2009, 10:53 PM
#4
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: How to find path to active template files?

OK, I found what I was looking for. Here is how one would zen code the path to the active templates stylesheet.css.

echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'css').'/stylesheet.css';

Experience is what you get when you don’t get what you want…