[PW-dev] Page widget and themes
Status: Alpha
Brought to you by:
spadkins
|
From: James G S. <JG...@TA...> - 2001-06-28 19:14:09
|
Thinking about themes and widgets, I'm working on a Page widget
based on some PHP code I have.
The basic interface:
$page = $wc -> widget("Page", (class => "Front"));
# for default layout
# +---+---------+---+
# | | T | |
# | L +---------+ R |
# | T | | T |
# | L | | R |
# | L | | R |
# | B +---------+ B |
# | | B | |
# +---+---------+---+
# if configuration file can define widgets, the following four
# lines could be in the config file.
$page -> T("Stuff at the top of the page");
$page -> B("Stuff at the bottom of the page");
$page -> LTLLB("Stuff along the left top, left, and left bottom");
$page -> RTRRB("Stuff along the right top, right, and right bottom");
$body = $page -> ARRAY;
@{$body} = (
# array of widgets and strings
);
print $page;
__END__
The Page object could be configured to use any of a variaty of
layouts, some dependent on the configuration class.
This kind of widget might benefit from allowing widgets to be
created based on the configuration file instead of explicit calls
in Perl.
I think my present configuration code allows for reading multiple
configuration files. This allows for global configurations with
local configuration files representing content, for example.
This gets us dangerously close to AxKit without the stylesheets :)
--
James Smith <JG...@TA...>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix
|