<?include=""> vs template.dwt or .tpl

Discussion in 'Programming' started by sakib000, Apr 29, 2007.

  1. #1
    which is best thing <?include=""> vs template .dwt or .tpl
     
    sakib000, Apr 29, 2007 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    .tpl is a Template file for PHP. .dwt is a client-side template for Dreamweaver (I think) and <? include is a PHP server-side raw include. I only do <? include because I think templates shave a little time off, but its a lot more intensive on the server.
     
    ccoonen, Apr 30, 2007 IP
  3. Webice

    Webice Peon

    Messages:
    49
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Everything depends on how do you want it.
    - do you want it to be scalable?
    - do you want it to be fast?
    - do you want it to be easy to change?

    Fastest way is by using <?php include "file.php" ?>

    I recommend using .tpl and .dwt, it makes it easy for you to make changes.
     
    Webice, Apr 30, 2007 IP
  4. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I strongly suggest you use php includes <? include 'top.php' ; ?> as you can actually use do scripting this way as well as use for template purposes. When you use .tpl files you are reliant on smarty (or other) {variables} which is much less powerful and not straight forward at all.

    Just my opinion because I am used to programming. If you are used to templated layouts, your opinion might differ.
     
    ErectADirectory, Apr 30, 2007 IP
  5. jgjg

    jgjg Peon

    Messages:
    595
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    both php includes and dwt templates ;)
     
    jgjg, May 9, 2007 IP