I'm trying to create a page element that my developers can include in their
pages, and not have to know midgard code.
I can get them to set variables, so this should be pretty straight forward.
I have them set two variables before they call the element
$name (The name of the topic)
$num (how many articles they want to fetch)
her is the code of the element
***********************************
<?php
$topic = mgd_get_topic_by_name($name);
$topic_id = $topic->id;
?>
<? $article = mgd_list_topic_articles_all($topic_id);
if ($article) for ($i = 0;$i < $num && $article->fetch(); $i++)
{ ?>
<p>
<strong>&(article.adate);
: <a href="&(article.id);.html">&(article.title);</a></strong><br>
&(article.abstract);<br>
</p>
<? } ?>
*********************************************
Now why doesn't the function mgd_get_topic_by_name() work? as far as I can
tell it isn't returning anything. I know that I'm passing it the correct
name, but I can't get the ID.
Thanks for the help Miles
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]