I am trying to write some code that starts at a hard-coded $root topic and
displays either a list of subtopics or a list of articles under the root
topic. My content has only subtopics or articles as at each level of the
tree, so I'm not considering a mixed case.
Whenever I try to display the subtopics with the following code, I get
subtopics from $topic=1, the admin site. Anybody know why?
<?
if ($topic) { ?>
<p>This is a topic</p>
<?
$lst = mgd_list_topics($topic);
if(!$lst) {
/* eventually will try to list any articles under topic here */
echo "mgd_list_topics($topic) failed.<br>";
}else{
while($lst->fetch()){
?>&(lst.name);<br><?
}
}
}
if ($article) { ?>
<p>This is an article</p>
<[article]>
<? } ?>
<p>id: &(id); topic: &(topic.id); article: &(article.id);</p>
<?
?>
The 3rd to last line here tells me that these 3 variables have the correct
values including null.
Maybe someone already has some working code and is willing to share it. I
would appreciate any help or ideas. Thanks.
-Rob
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]