AppDB TODO update: Templates
Stefan Pflüger
stefan at homepage4us.de
Wed Dec 22 13:33:18 CST 2004
Basically, I'll implement a class that is able to read a template file
and that can assign content to special tags in there.
The index.php would create an object of this class using a "main
template" that includes all parts of the page that are static (header,
footer, the main html tables). Depending on a GET variable, the
index.php calls a function whose returned data will be used as the main
content, it would be for example index.php?action=browseapps to get to
the "Browse Apps" page.
The content of the sidebar, the banner ad etc. would also be created by
a function like it's already done (see banner_display() in
include/banner.php), but instead of just echo-ing this somewhere in the
right place, it would also be fed into the template engine that again
replaces the corresponding tags in the main template. Those functions
might also use the template class to implement their own sub-templates.
In the end, the template class object in index.php should have the
complete output ready for sending it to the user.
Hopefully, my short explanation was good enough to illustrate the concept.
Stefan
PS.: What's the correct list/address to send mails concerning this
discussion to? I'm sending them to the wine-devel list atm, CCing to
Chris Morgan and appdb at winehq.org...
More information about the wine-devel
mailing list