[resolved] TEMPLATE and TEMPLATEPATH (4 posts)

  1. misterpatrick67
    Posted 7 years ago #

    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?

  2. Mark / t31os

    Posted 7 years ago #

    <?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...

  3. misterpatrick67
    Posted 7 years ago #


    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.

  4. misterpatrick67
    Posted 7 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic