Menu

#448 Template System

open
nobody
5
2005-07-08
2005-07-08
No

What do you think about using a templating system in a
future version? I'd love to see a layout as clean as
TNG5 uses for their individual page.

Discussion

  • John Finlay

    John Finlay - 2005-07-11

    Logged In: YES
    user_id=300048

    PHP is a templating system. HTML/CSS is a templating
    system. Do we really need another templating system?

    PGV needs to make several steps towards being more MVC
    compliant before something like this could be added.

    --John

     
  • Patrick Kellum

    Patrick Kellum - 2005-07-12

    Logged In: YES
    user_id=157163

    But what if someone wants a different layout for the
    individual page? They have to hack the script for every
    release. For instance, I want to handle layout without
    using the current tab system.

     
  • John Finlay

    John Finlay - 2005-07-18

    Logged In: YES
    user_id=300048

    You would have to hack the page with a template system
    too. There is no way around changing the layout without
    hacking the pages.

    You can get rid of the tabs using CSS. Hide the div that has
    the tabs in it, and enable all of the other divs. This is what
    the print-preview does.

    I'm not saying that PGV is perfect in this regard... there is far
    too much code in the individual page right now making it hard
    to hack. But I don't think a templating system is the answer
    we are looking for.

    --John

     
  • Patrick Kellum

    Patrick Kellum - 2005-07-21

    Logged In: YES
    user_id=157163

    I've written a few templating systems for clients and I
    don't see how it would require any hacking of the page to
    change layout.

    Anyway, no matter. Perhaps insted cleaning up the output
    html and getting rid of all formatting that can be placed in
    CSS (and no tables, use div for better CSS control). See
    the website http://csszengarden.com/ for some examples of
    what can be done by just changing the css.

     
  • John Finlay

    John Finlay - 2005-07-21

    Logged In: YES
    user_id=300048

    Maybe I am not understanding what you mean by template
    system. When I hear the term template system I am
    thinking of something like Smarty. The idea behind smarty is
    that you put everything into variables and then position
    elements on the screen with those variables. The idea being
    that you can hand off page design to a graphic designer who
    can put the variables where they want them.

    I think that the first step is to enforce the MVC architecture
    and push a lot of the code back out the scripts.

    --John

     
  • Patrick Kellum

    Patrick Kellum - 2005-07-22

    Logged In: YES
    user_id=157163

    I agree that a restructor will be needed eventually
    (although I'de start with the includes directory, the
    current system is far too confusing with related functions
    being scattered between many scripts) to support any
    seperation.

    My idea for templating would be for the main script to be
    mainly html with calls to an API to retrive needed data.
    This would eliminate much of the overhead of a templating
    system (Smarty has way to much overhead IMHO) while still
    giving designers more control. As long as the API files
    were the only files changed every update, maintaining such a
    layout would be easy for a sysadmin/designer.

    Patrick

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.