midcom - photo gallery

Marcin Sołtysiak <[email protected]>
Newsgroups gmane.comp.web.midgard.user
Message-ID <[email protected]>
Hi, 
 
I got strange problem. I got several galleries and have th efollowing code
for next/previous links:
 
<?
 
  $leaves =
$GLOBALS["midcom_site"]["nap"]->list_leaves($GLOBALS["midcom_site"]["nap"]->
get_current_node());
  if (is_array($leaves) && count($leaves) > 0) {
    $cnt=count($leaves);
    for($i=0;$i<$cnt;$i++){
      $leaf = $GLOBALS["midcom_site"]["nap"]->get_leaf($leaves[$i]);
      if($leaf[MIDCOM_NAV_NAME]==$data["name"]){
 
       if($prev=$GLOBALS["midcom_site"]["nap"]->get_leaf($leaves[$i-1]))
        $prevlink="<a href=\"".$prefix.$prev[MIDCOM_NAV_NAME]."\">".
                  "<img
src=\"/attachment/0847915551ae95029416708b61c6fc8d/8a6ed16d2365aee54e05a4e2f
f52d812/przycisk_poprzednie.gif\" width=100 height=36 alt=\"\"
border=\"0\">".
                  "</a>";
       else
        $prevlink="<img
src=\"/attachment/0847915551ae95029416708b61c6fc8d/0284d66cb0f35bfc74707bfa1
bf27035/spacer.gif\" width=100 height=1 alt=\"\">";
 
       if($next=$GLOBALS["midcom_site"]["nap"]->get_leaf($leaves[$i+1]))
        $nextlink="<a href=\"".$prefix.$next[MIDCOM_NAV_NAME]."\">".
                  "<img
src=\"/attachment/0847915551ae95029416708b61c6fc8d/a5ba8dad445935ef1a1c031a2
b7c3d9a/przycisk_nastepne.gif\" width=100 height=36 alt=\"\" border=\"0\">".
                  "</a>";
       else
        $nextlink="<img
src=\"/attachment/0847915551ae95029416708b61c6fc8d/0284d66cb0f35bfc74707bfa1
bf27035/spacer.gif\" width=100 height=1 alt=\"\">";
      }
    }
  }
?>
 
for one of galleries I dont get $leaves array and the navi part is not then
executed. But why? It is same gallery as the others...
 
Solt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.