Support » Themes and Templates » TEMPLATE and TEMPLATEPATH

  • Resolved misterpatrick67


    Hello all,

    I’m working on migrating a theme designed by someone else from 2.6 to 2.8. It looks like the theme is held together by bits of string and I am trying to figure out what is going on with it. I have these calls in the index.php:

    <?php include(TEMPLATE.’nav.php’); ?>

    Is this correct or has it been deprecated? It seems like it should be this:

    <?php include(TEMPLATEPATH.’/nav.php’); ?>

    Or does TEMPLATE point somewhere else or define a template. Part of the problem is that I cannot find a file called nav.php which is making me think that the file itself didn’t make it over in the transition or is this somehow defining an internal template style?

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php echo TEMPLATEPATH; ?>

    Will give you the output of TEMPLATEPATH…

    See what you get…

    It just refers to a constant. You can change it if you want..

    Regarding the slash, that really depends on the value it contains, it may already have the ending slash…


    I actually know how the TEMPLATEPATH worjs as U use it all the time, it’s the first one I am wondering about, just the plain TEMPLATE. When I echo that it just outputs the word ‘TEMPLATE” so I am wondering if it was either incorrectly entered by the original programmer or is a deprecated command.

    OK, solved. There was an external includes file that was define the variable TEMPLATE, so that is what was going on and where the missing files were.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘TEMPLATE and TEMPLATEPATH’ is closed to new replies.