> The common sense says it must go in a style element
> or in an overridden page
> element if one is to reach the economy factor that a
> CMS is supposed to
> offer.

sure!
 
> Based on the above style organisation, what if one
> would like those
> navigation elements to grow or shrink as one is
> adding new pages and/or
> topics/articles.  Then, this style would have to be
> dynamic, therefore
> should contain "code" to retrieve all the subtopics
> (for example) or all the
> pages (for example) under a hat topic or page.  My
> point is that "no code
> should be put in style or page elements" in order to
> separate logic and
> presentation.  My question is : how can we have at
> the same time relatively
> static styles that contain a small amount of logic
> to scan directories and
> be updated as new section are added or subtracted?

I think I just do not agree when you say that
"separating logic and presentation" implies "no code
should be put in style or page elements".  It's not
because you use code to dynamically build a navigation
bar, that it's not part of the presentation. Call it
"presentation logic" :-)  to distinguish it from the
"application logic" specific for a page, containing
for example some form processing code.  However,
you're right this is a very thin line: the code in
pages often does nothing more than displaying article
titles or contents in some way or another, so where's
the difference with a style element building a dynamic
navigation bar based on the topic hierarchy?
I think the rule of thumb here is: code specific to
one URL (with or without parameters) belongs in a
page, common cross-page code belongs in a style (think
I'm repeating myself?).
But then, it is still advisable to separate code from
"layout elements" (hehe, this way avoiding the word
presentation) by isolating them in several page/style
elements or snippets, and/or by using a CSS. 

pascal

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to