Jump to content


[dutch - Nederlands] - Faq Snippet


  • You cannot reply to this topic
No replies to this topic

#1 PieDie

    Etomite Forum Fan

  • Member
  • Pip
  • 82 posts

Posted 25 May 2005 - 09:12 AM

FAQ SNIPPET

Call using [[FAQ?faqFolder=id]], where id is the ID of the FAQ folder.

- DUTCH -

FAQ maakt een Veelgestelde vragen pagina. Knip en plak de tekst als snippet FAQ in Etomite en roep de snippet aan als [[FAQ?faqFolder=id]]. In de plaats van ID zet je het cijfer van de map waar je vragen in zitten (één document per vraag). Indien er geen vragen zijn, zie je 'Geen vragen gevonden'.

Succes!


$resourceparent = isset($faqFolder) ? $faqFolder : $etomite->documentIdentifier;
$output = "<script type=\"text/javascript\">
function expand(thistag) {
  styleObj = document.getElementById(thistag).style;
  if (styleObj.display=='none') {styleObj.display = '';}
  else {styleObj.display = 'none';}
}
</script>";


$faq = $etomite->getActiveChildren($faqFolder,'pagetitle', 'ASC', $fields=' id, pagetitle, content');
$limit=count($faq);
if($limit<1) { 
  $output .= 'Geen vragen gevonden!<br />'; 
} 
for ($y = 0; $y < $limit; $y++) {
$output .= '<ul><b><div onclick="expand('.$faq[$y]['id'].');" style="cursor:pointer;"><li><div class="faq">'.$faq[$y]['pagetitle'].'</div></b></li><div id="'.$faq[$y]['id'].'"  style="display:none">'.$faq[$y]['content'].'</div></div></ul>';
}

return $output;






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users