SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    May 2005
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Where can i learn how to make a good template class?

    I've searched the internet high and low to find a article that covers how to make a good template class but i cannot find one any where.

    I can find articles that make tutorial classes but they do not show you how you can use databases with them they are normally just simply replacing variables and outputting a page.

    Does any one know of a good article that covers it all?

    thanks

  2. #2
    SitePoint Enthusiast itportal's Avatar
    Join Date
    Sep 2005
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Start here: http://mt-soft.org/my_articles.php?id=1

    And continue by yourself ... At the end ... see the code of Smarty

  3. #3
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,196
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    There are different types of template engines, so the answer to your question depends on which one you want to create.

    There is an old article right here on SitePoint which should be able to point you in the right direction at least.
    http://www.sitepoint.com/article/beyond-template-engine

    I would not advice you to take a closer look on the Smarty code, imo its bloated.

  4. #4
    SitePoint Zealot
    Join Date
    May 2005
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by itportal
    Start here: http://mt-soft.org/my_articles.php?id=1

    And continue by yourself ... At the end ... see the code of Smarty
    I was on about a template class, like the one phpbb uses. so opening a template file with things like {BLAH} and then using the class to replace {BLAH} with a what ever is defined.

    And then with the looping bit i was on about so you can do that with multipul results.

    Quote Originally Posted by TheRedDevil
    There are different types of template engines, so the answer to your question depends on which one you want to create.

    There is an old article right here on SitePoint which should be able to point you in the right direction at least.
    http://www.sitepoint.com/article/beyond-template-engine

    I would not advice you to take a closer look on the Smarty code, imo its bloated.
    I will read through that article. And yer i don't really want to go looking through smarty. I have used it before and its just too much, like the way you can use certain php functions on the template it just isn't needed.


Bookmarks

Posting Permissions

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