well, I thought I was getting close to figuring this out but I am still 
missing the boat...(if I had $1 for everyboat I missed I would have bought 
the boat by now)

I have a root page, it is active...it lists all of the topics and 
descriptions for a category...the idea is that the topic name is a link 
into the topic, there is a <[topic]> (listed further down) that should take 
me into the topic and list all of the articles which are childeren of that 
topic..the link works, it goes to /topicname/ but then it seems to go back 
to the root page for content...it seems like either A) it is not picking up 
the topic condition and going off to the topic subpage or ...well that 
seems to be it...also I am having trouble finding a way to pass the 
variable topic ID into the  <?$article 
=mgd_list_topic_articles(topic.id);....I think...though I haven't gotten to 
run that far.....

any suggestions?....a raft of code follows (little boat pun there)

<? if ($article) { ?>
<[article2]>

<? } else {
     if ($topic) { ?>
<[topic]>

<?   } ?>       
<tr height="98">
                                <td width="1" height="98"><spacer type="block" 
width="1" 
height="98"></td>
                                <td width="486" height="98" colspan="5" rowspan="1" 
valign="top" 
align="left" xpos="77" content csheight="92">
<!-- Fetch the news -->
<?   $article = mgd_list_topic_articles(41);
     if ($article) for ($i = 0; $i < 5 && $article->fetch(); $i++) { ?> 
<!-- Get only 3 newest -->
<p><font 
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><strong><H2>&(articl  
e.title);</H2></strong>
</strong>
<? } ?>
  <? if ($article->abstract) { ?>
  &(article.abstract);<br>
  <? } ?>
</p>
<?   } ?>
<p><strong><h3>Development Departments....</h3></strong><br>
<? $topic= mgd_list_topics(41);
if ($topic) for ($i = 0; $i < 25 && $topic->fetch(); $i++) { ?>
  <strong><a href="/&(topic.name);/">&(topic.name);</a></strong><br><br>
<? if ($topic->description) { ?>
  &(topic.description);<br><br>
  <? } ?>
<? } ?>

</font>
</td>


As per Cat's suggestion I added a line to the code-init ( I "borrowed" the 
code-init from the demo site...I still am fuzzy on when it gets called 
though

if ($id) $topic = mgd_get_topic($id);


there is a page element called <[topic]>

<? if ($article) { ?>
<[article2]>

<? } ?> 
<tr height="98">
<!-- this is stupid but I will try -->
<? if ($topic->id) { ?>
                                <td width="1" height="98"><spacer type="block" 
width="1" 
height="98"></td>
                                <td width="486" height="98" colspan="5" rowspan="1" 
valign="top" 
align="left" xpos="77" content csheight="92">
<!-- Fetch the news -->
<?   $article = mgd_list_topic_articles(topic.id);
     if ($article) for ($i = 0; $i < 5 && $article->fetch(); $i++) { ?>
<p><font 
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><strong><H5>&(articl  
e.title);</H2></strong>
</strong>
<? } ?>
  <? if ($article->abstract) { ?>
  &(article.abstract);<br>
  <? } ?>
</p>
<?   } ?>
<p><strong>Development Departments....</strong><br>
<? $topic= mgd_list_topic_articles_all(41);
if ($topic) for ($i = 0; $i < 25 && $topic->fetch(); $i++) { ?>
  <strong><a 
href="/dev/&(topic.name);/">&(topic.name);</a></strong><br><br>

<? } ?>

</font>
</td>


--
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]

Reply via email to