On Wed, Dec 05, 2001 at 01:54:42PM -0800, Kassetra Stevenson wrote:
> 
> 
> Thank you very much for the snapshot Emile.  
> 
> Let me see if I am understanding this correctly now:
> 
> Since all of the pages in my company's website have the same headers and
> footers, I can make a single root style that has two elements: header
> and footer -- but where do I put my .css code, is that another element
> of the root style?

You can make another style element and include it into your style,
says, in your header element (as you describe it in html code).
Quick sample:

Style element "Header" contains:

<html>
<head>
<title><[title]></title>
<style><!--
<[css]>
--></style>

And in your "css" element you can put your styles as in plain .css
file:

a {text-decoration: none;
   color: blue;
   }

a:hover {text-decoration: underline;
   color: blue;
   }

...and so on...

> 
> Then the single page layout (in html) that all of the pages use, is a
> root page element, correct?  That's where I use php in another page
> element to pull the content from topic.articles...?  So that when a link
> from the header navigation is clicked on, it chooses (with php code) the
> correct topic to go to and displays the articles in that topic?

It isn't very clean (I didn't see Emile's code, so I can't say
anything about it).
Generally you can put somewhere in your style element <[content]>.
It's special style element that defines content of page. So when your
pages are visisted, Midgard looks in style, makes the make-up ;) and
puts content of page in place of <[content]> in style.

But from other side - you can put everything in style and don't use
<[content]> element at all. But I think (it's only my opinion) that
it's more difficult. I prefer make small and easy pages, even if there
would be a lot of them :)

And php code you use php everywhere in pages, styles and so on - every
Midgard page is in php before processing it by apache.

> 
> Which means that I can create groups and users that correspond to
> topics?  so that the *help* section of the website can be owned by a
> group named *help* ... and then users part of the *help* group can edit
> the *help* topics?

Yes.

> 
> But where do I put my php code for the forms that people fill out?  I
> have these forms that guide people through a signup procedure by asking
> them questions, and their responses determine where they go next... is
> that what snippets are for?

You're free in your choice. You can make it in snippet and then
include it from your pages, and you can put it directly on pages.
Snippets are for collecting functions and using them, says, on
different hosts or just different pages. So you could describe some
functions in style element and include it into ROOT, and you could do
it by snippet and make mgd_include_snippet("snippet_name").

> 
> Ok, last question (for this email)... I also have this php script for
> taking the first letter of each article and replacing it with a jpeg
> letter... where would I put that script so that it runs for every
> article?

Well, says you have page "article". In content of this page you have
some code to dispay article content. Something like that:

<?php
if ($argc > 0) {
  $id = $argv[0];
  $article = mgd_get_article($id); /* page "article" should be
                                          active. And I didn't any
                                          checks that article exists
                                          */
  echo first2jpeg($article->content); /* Calling your script to change
                                        first letter to jpeg image,
                                        output from it we show on html page */
}
?>

I hope that it gives you an idea.

--
Regards,
Sergei Dolmatov.

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

Reply via email to