Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2010
    Posts
    3
    Plugin Contributions
    0

    Default Constant/function that returns absolute path for current Template

    After many searches and tryouts i give up trying to find which constant/function returns the absolute path for the currently used template directory.

    The thing is i'm trying to create a gallery, which will feature some imagery, videos, etc. The problem is if i place my images inside my IMAGES folder on the overriden template Dir, in order to access them i have to specify the absolute path to that images directory, and it would be more simple having some kind of constant or function that returns that info to me, dynamically, so even if my template dir changes name the information would allways be correct.

    <img src="<?php echo TEMPLATE_DIR . /images/gallery/1.jpg ?>"/>

    Dont really know if zencart has such thing declared in it, it def. should, any idea boys and girls ? =)

    thanks in advanced.

  2. #2
    Join Date
    Nov 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: Constant/function that returns absolute path for current Template

    PS: the constant/function has to be accessible on a EZ-page, since its where i'm placing the gallery.

  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Constant/function that returns absolute path for current Template

    Why are you placing the images in the template/images directory instead of the main images directory?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  4. #4
    Join Date
    Nov 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: Constant/function that returns absolute path for current Template

    because the gallery and their images belong to that specific template ?

 

 

Similar Threads

  1. Replies: 2
    Last Post: 5 Dec 2013, 01:07 PM
  2. Prevent absolute path from showing in url.
    By bx32 in forum Basic Configuration
    Replies: 3
    Last Post: 27 Oct 2011, 04:32 PM
  3. How do I show url instead of absolute path
    By WebManV in forum General Questions
    Replies: 13
    Last Post: 16 Nov 2010, 12:15 AM
  4. error in path (function.session-save-path) after switching servers
    By stitch in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 16 Feb 2010, 09:37 AM
  5. Absolute Path
    By nanajo in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Nov 2006, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg