Actually, CSS is very powerful--way more than simple html.  One drawback is
that CSS1 did not include any support for tables directly, but the generic
controls work nicely, there just is no way to say "<table align=center>" in
CSS1.  A great book that taught me a lot about CSS is
http://www.oreilly.com/catalog/css/ --I'd lone it to you if you were local.

I think it would be feasible to store all content in one db: just use your
templates to convert the articles to appropriate markup and then store the
results.

(I am departing from html)
The interview:
[input_form]
Template: <select>"Interview"</select>
Question: <input value="How are you doing?">
Answer: <input value="Fine, thanks for asking">

[form_submittal]
$content = _header($template);
foreach (question) {
  $content .= "<p class='question'><span class='us'>Us:</span>$question</p>"
                  "<p class='answer'><span
class='them'>Them:</span>$answer</p>";
}
insertArticle($content);

The beauty product:
[input_form]
Template: <select>"picture"</select>
Picture: <input file="pic1.jpg">
Description: <textarea>"Just imagine yourself all prettied up like this
glorious person"</textarea>

Transition: <textarea>"And now that brings us to some really cool
whale-inard products"</textarea>

Picture: <input file="pic2.jpg">
Description: <textarea>"We promise that no animals were harmed during the
making....."</textarea>

[form_submittal]
$content = _header($template);
foreach(picture) {
  $content .= "<p class='picture'><img class='pic$count'
src='$file'>$description</p>";
  if ($transition != '')
    $content .= "<p class='$transition_count'>$transition</p>";
}


...anyway, you get the idea.....this is a rather simple approach--but, you
could combine something like this with an output template to get really good
results.

> -----Original Message-----
> From: Monty [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 11:46 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Best way to store/retrieve content??
> 
> 
> I will be using CSS for other thing, such as paragraph 
> formatting, but, not
> sure how to use it for creating tables and flowing text 
> around graphics. Can
> CSS really do all that? Still not sure if this will work 
> because I don't
> want the writers to have to type in any HMTL code at all if possible.
> 
> Here's a good example: One article may be a simple interview with some
> images (this is easy to enter into a database). But another 
> article about
> new beauty products has a grid of images plus a short blurb about each
> product next to the photo. This requires more intricate 
> formatting with HTML
> than an interview does.
> 
> I don't have a problem creating separate templates for these 
> special types
> of articles, but, it looks like I'd also have to set up 
> separate database
> tables to store this article data differently than it would 
> be stored for a
> simple interview. But, it would be better if all content was centrally
> stored in one table to make searches better/easier...or am I 
> expecting too
> much from just one content table?
> 
> What to do, what to do!
> 
> 
> 
> > From: [EMAIL PROTECTED] (Court Shrock)
> > Newsgroups: php.db
> > Date: Thu, 7 Mar 2002 11:31:20 -0800
> > To: 'Monty' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> > Subject: RE: [PHP-DB] Best way to store/retrieve content??
> > 
> > I would try to use CSS, instead of complex tables.  That 
> way, you only need
> > to store the structural html in the database and the layout 
> is handled by
> > CSS--floating images and flowing text are really easy with CSS.
> > 
> >> -----Original Message-----
> >> From: Monty [mailto:[EMAIL PROTECTED]]
> >> Sent: Thursday, March 07, 2002 11:31 AM
> >> To: [EMAIL PROTECTED]
> >> Subject: [PHP-DB] Best way to store/retrieve content??
> >> 
> >> 
> >> I'm writing some content management scripts for an online
> >> magazine. Many
> >> articles are formatted in a similar way, but some have a
> >> unique page layout
> >> that includes grids of photos, tables, etc.
> >> 
> >> I'm not sure if the best way to store content is in a
> >> database so it can be
> >> flowed into an article template, or to simply lay out the
> >> page as HTML,
> >> surrounding it with a simple include("header.php") and
> >> include("footer.php")
> >> for header/footer HTML and graphics. For articles that
> >> require things like
> >> tables, it would be a pain to have to write this HTML by hand
> >> or lay it out
> >> in Dreamweaver then copy and past the code into the database
> >> field (using an
> >> Admin web form).
> >> 
> >> Or, is it prudent to set up a custom table in the databse for
> >> each type of
> >> content so that a matching template can be used to format the
> >> pages properly
> >> without having to include all the HTML in the database with
> >> the content
> >> itself?
> >> 
> >> Hope this makes some sense. Just trying to figure out the
> >> best way to tackle
> >> this. All input is appreciated!
> >> 
> >> Monty
> >> 
> >> 
> >> 
> >> -- 
> >> PHP Database Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to