Andre Gerhard wrote:
> I suppose I could have a root Layout/Style with
>
> <HTML><BODY>
> <table>
> <tr><td>
> <(content)>
> </td></tr>
> </table>
> ...
> <table>
> <tr><td>
> <(content)>
> </td></tr>
> </table>
> </BODY></HTML>
>
OK, what you need to do is some sideways thinking here.
Regard the "style" as being the general site style -- header, footer, coloring,
where your navbars go, background pix, etc. In the middle of this, put
<(content)>. The content will be taken from the particular page being served.
Then, define one or more page layouts in php that express what you want to do
within the page and put that in as the page content.
In other words, regard the site style and the page layout as entirely unrelated
components of the site....
I suggest that you create a PHP function for each different kind of in-page
layout, either in the code-snippet facility, in code-global (which you must
then include as an element in your site style), or as an external file which
you include(). Then you can just call the appropriate layout function and
pass it some arguments (e.g., where on the topic tree you want to start pulling
articles from).
Here's a quick pseudo-code example:
function two_column_page(topic_root_1, topic_root_2)
{
echo "<table width=\"100%\"><tr><td width=\"50%\">\n";
pseudo_get_and_print_articles_or_whatever(topic_root_1);
echo "</td><td width=\"50%\">\n";
pseudo_get_and_print_articles_or_whatever(topic_root_2);
echo "</td></tr></table>\n";
}
(Yes, the above is rude and crude. I keep my funcs in a separate file so I can
use vi, change, debug, etc. It is also a good way to keep the functions of
layout and content creation separate among people.)
On the page, the page content would be:
<?php two_column_page(arg1, arg2); ?>
If you use an include() file, be sure to have the file owned by root if you
have safe mode on because otherwise you will not be allowed to execute
(include) stuff owned by anyone else.
This allows you to have a site-wide style, different page layouts within it
without having to get into inherited styles -- handy functionality but can get
convoluted.
cat
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]