Building a Barebones Content Management System: The Yaapi API - yaapi -- Getting Started (Page 3 of 6 )
Last week, I created a category titled "Test." Let’s rename it to something more meaningful, say "PHP" in keeping with my "DevShed" example, outlined in the previous section. Currently, I have one article (created in the previous article) in the database. Let me be practical; it is nonsensical to demonstrate how to display a list consisting of one article. It's time to rectify this discrepancy; I will proceed to add some more test articles using the yaapi administration module.
One final bit before I dive into some PHP code. In the last article, I stated that "significant components of a web page are constant." For example, you may have a header with a logo and a banner, a left hand menu of hyperlinks, footer with legal copyright notices and so on. For the reader’s benefit, I have put together a simple HTML outline that may help you visualize such a layout and at the same time, it shoud serve as a framework for my examples.
<HTML>
<HEAD>
<BASEFONT FACE="Arial">
</HEAD>
<BODY>
<TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="5" ALIGN="CENTER"
VALIGN="TOP" HEIGHT="450" BORDER="1">
<TR>
<TD COLSPAN="2" WIDTH="100%" ALIGN="CENTER">
<P> </P>
<H1>BB_CMS - A Barebones Content Management System</H1>
<P> </P>
</TD>
</TR>
<TR HEIGHT="350">
<TD WIDTH="25%" ALIGN="MIDDLE" VALIGN="TOP">
<P><A HREF="#">LINK 1</A></P>
<P><A HREF="#">LINK 2</A></P>
<P><A HREF="#">LINK 3</A></P>
<P><A HREF="#">.. and so on.</A></P>
</TD>
<TD WIDTH="50%" ALIGN="LEFT" VALIGN="TOP"> Content from database will
come here.</TD>
</TR>
<TR>
<TD COLSPAN="2" WIDTH="100%" ALIGN="CENTER">
<H5><A HREF="#">Copyright</A> | <A HREF="#">Privacy Policy</A></H5>
<BR CLEAR="all" />
<H6>© 2005 BB_CMS Inc.</H6>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Load this HTML template in your browser to view the following output:

I have content. I have an HTML layout. All that remains to be done is to pump in some dynamic content -- using yaapi, obviously.
Next: yaapi -- Listing Articles >>
More Administration Articles
More By Harish Kamath