Hi
You need a script to get the article from the base. Something like this (im using it
in code-init)
<?
if ($argc == 1) $articleid = $argv[0];
if ($articleid) $article = mgd_get_article($articleid);
?>
of If you want to get the article by its name (switch &(article.id); with
&(article.name); in the listing procedure)
<?
if ($argc == 1) $articlename = $argv[0];
if ($articlename)
{
$topic = 15;
$article = mgd_get_article_by_name($articleid, $topic);
}
?>
now you can use something like this in ur news subpage.
<h1>&(article.title</h1>
<b>&(article.abstract)</b>
...
Vidar
----- Original Message -----
From: Simon Clayton <[EMAIL PROTECTED]>
To: 'midgard' <[EMAIL PROTECTED]>
Sent: Wednesday, September 12, 2001 3:19 PM
Subject: [midgard-user] Problem with subpages
> Hi,
>
> I have created a root page with a subpage called news.
> I have added some content to the news subpage.
>
> The following code has been added to my root page, this code generates links
> to articles.
>
> When I enter the site the root page shows the links to the articles, but
> when I click on the links
> I get 'HTTP 404 - File not found'.
>
> Any body got any ideas?
>
> This is the code in my root page
>
> <h2>Latest company news:</h2>
> 3:
> 4: <p>
> 5:
> 6: <?
> 7:
> 8: $news_topic = 15;
> 9:
> 10: $article = mgd_list_topic_articles($news_topic);
> 11:
> 12: if ($article)
> 13:
> 14: {
> 15: for ($i = 0; $i < 3 && $article->fetch(); $i++)
> 16: {
> 17: ?>
> 18:
> 19: <h3><a href="/news/?id=&(article.id);">&(article.title);</a></h3>
> 20: <br>
> 21: <?
> 22:
> 23: if ($article->abstract)
> 24: {
> 25: ?>
> 26: &(article.abstract);<br><br>
> 27: <?
> 28: }
> 29: }
> 30: }
> 31: ?>
> 32:
> 33: </p>
> 34: <h2>End of Company News</h2>
>
> regards
>
> Simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]