• 0

Need advice on theme system


Question

Hi,

My team and I are currently coding a "PHP Web Engine" that will support skining. The "engine" uses classes to represent the web page.

So, we currently have a page class that holds the pages contents, description, links and a menu class, which (you gussed it), hold the main menu and sub menus(recursive algorithm)...

But we need a theme class that would take the data and format it. Now, we want theme to handle all the HTML, the PHP doesn't have any HTML so we can output any way we want. I'm have trouble making the interface for such a theme system and would like ideas from great programers...

Here the general interface for the Page class (to give you an idea on how we designed the back-end)

class Page
 + function getTitle() : returns the Title of the page
 + function getDescription() : returns a description of the page, useful for searchs 
 + function getContent() : returns an array; each "composent" is a paragraph in the "page". This may contain special tags as :BOLD: :/BOLD: make text formatting. (No HTML here !!)
 + function getLinks() : returns an array of links; these should make a side-menu (aka an important links menu)
end class Page

Any comments would be helpful (as long as they are constructive ones :) )

Thanks !!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.