Jump to content
php.lv forumi

marin4x

Reģistrētie lietotāji
  • Posts

    1
  • Joined

  • Last visited

Posts posted by marin4x

  1. ka var uztaisit kokveida navigaciju izmantojot Pear

    Kods:

    Gunkcija kas genere outputu:

     

     

    function generateOutput(){ // fill output expression by module html code

     

    $mtpl = new IntegratedTemplate($this->incs->modules->value."/".$this->getClassName()."/");

    $mtpl->loadTemplatefile($this->getClassName().".tpl.html", true, true);

     

    //$this->getTree();

     

    $cat_array = Category::getChildren();

    //$count_1level=sizeOf($cat_array);

    foreach ($cat_array as $cat) {

    $elem_id= $cat->getId();

    echo $cat->getName()."<br>";

     

    if ($cat->hasChildren($cat,active)) {

     

    ??????????????????? }

    }

     

    /*

    $mtpl->setVariable("IMAGES", $this->html->image->value);

     

     

    for ($i=0; $i<10;$i++) {

    $mtpl->setCurrentBlock("bubu_block");

    $mtpl->setVariable("BUBU",$i);

    $mtpl->parseCurrentBlock("bubu_block");

    }

     

    */

    // $mtpl->touchBlock("address_area");

     

    ////////////////////////////////////////

    // ******* END: MAIN CODE *************

    ////////////////////////////////////////

     

    return $mtpl->get();

    }

×
×
  • Create New...