Hello,

Kassetra Stevenson wrote:
> 
> Ok, after reading tons and tons of email replies (THANK YOU SO MUCH!!!),
> I finally was able to get my web site successfully placed into midgard.

Congratulations! Welcome to the band. :)

> The content has been separated out into topics, and I have created
> articles for the actual content, in their respective topics.

Yes, it is great to that point while your articles belong only to one
category. If it is not true, then you will have problems (I have got
now... :( )

> Now, two questions here (I'm learning, HONEST!)
> 1. I want to pull the articles for each topic into separate pages, so I
> know I need to create a page for each Topic.  Done.  I'm not quite sure
> how to write the php code to pull the Articles into the page, however.
> How do I pull the content for a given topic into a page?

Well, it depends on what admin interface do you use. If you use nadmin,
read http://www.hklc.com/midgard_manual/article_747 from its manual.

If you use other, then you have to code it yourself. One approach in a
nutshell: (correct me, if I wrong, as I use nadmin... ;-)

Create page (or style, if you create a sub-style for articles) elements
for templating the listing of the articles, and displaying the articles
itself. Set the page to active[*]. If there are no argv[] arguments (the
URL is ...blah/ you read the page of the topic), then you select the
articles with mgd_list_topic_articles(). In a loop, using
$articlelist->fetch(), with the help of the elements display the author,
title, ... of the articles, where every article is a link to ...blah/<id
of article>.

If argv[0] is an id, then you want to display one article. You get its
details with mgd_get_article(), use the elements for templating and
that's it.

> 2. Ok, now, here's my weird question (and I'm sure someone tried to
> explain it before, but I didn't know then what I know now about midgard,
> so please explain it to me again): I want to change the first letter of
> each article I pull into the page into a graphic.  I can write the php
> code to do so (hopefully) -- but I don't know where exactly to put this
> code.  Do I put it in the article pull code?  Help!

If you are a very clever guy, then the code of article list / article
displaying you place into a snippet. In that case you call this snippet
on every page you want to display articles.

Another possibility, that you create an active page where the argv[0]
contains the name of the topic, and all articles are displayed under
this page.

[*] Active page is when the last part of the URL is passed as argv[]
array to the page. For example, you set page
'http://www.blah/first/second' to active. Then if a browser wants to get
'http://www.blah/first/second/third/fourth', then the former page will
be used with argv[]==(array('third','fourth'));

Circum


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

Reply via email to