compile('../includes/lang.inc',array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true))); $selectorCat = ""; $category = ""; if($input->urlSegment1!=''){ $cat = $sanitizer->pageName($input->urlSegment1); $selectorCat = ",categoria.name=".$cat; $category = $pages->get("name=$cat"); } $latest = $pages->find("template=press{$selectorCat},sort=-created,limit=10,body{$selectorLang}!=''"); $pag = ""; $l_pag = \ProcessWire\__("Pagina"); if($input->pageNum>1){ $pag = " - {$l_pag} {$input->pageNum}"; } $l_nocontent = \ProcessWire\__("Spiacenti, non ci sono comunicati stampa per questa categoria"); $l_next = \ProcessWire\__("Avanti"); $l_prev = \ProcessWire\__("Indietro"); ?>

Comunicati Stampa

categoria ".$category->title; } ?>


renderPager(array( 'nextItemLabel' => $l_next, 'previousItemLabel' => $l_prev, 'listMarkup' => "
    {out}
", 'itemMarkup' => "
  • {out}
  • ", 'linkMarkup' => "{out}", 'currentItemClass' => "active" )); echo $pagination; if($latest!=''){ foreach($latest as $l){ if($l->images!=''){ $mainthumb = $l->images->first()->size(506,285)->url; }else{ $mainthumb = $config->cdn."img/photos/image-1.jpg"; } if($l->publish_from!=''){ $dataMain = strftime("%d %B %Y",strtotime($l->publish_from)); }else{ $dataMain = strftime("%d %B %Y",$l->created); } $u = $users->get($l->uid); $authorMain = $sn->getName($u); $latestBody = $sn->trimString(strip_tags($l->body,'
    '),140); if($l->oldlink == ''){ $socialhref = "http://".$_SERVER['SERVER_NAME'].$l->url; }else{ $socialhref = "http://".$_SERVER['SERVER_NAME'].$l->oldlink; } ?>

    Filtra per categoria

    find("template=categoria"); foreach($categories as $p){ $tot =$p->children()->getTotal(); echo " {$p->title} - {$tot}"; } ?>