Skip to content

Instantly share code, notes, and snippets.

@somatonic
Created April 3, 2012 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save somatonic/2294810 to your computer and use it in GitHub Desktop.
Save somatonic/2294810 to your computer and use it in GitHub Desktop.
$parent = '/processwire/access/users/' . $user->name;
foreach($pages->get("/tools/categories/")->children("sort=title") as $tag) {
echo "<h2>$tag->title</h2>";
foreach($pages->find("parent={$parent}, course_categories=$tag") as $p){
echo "<a href='{$p->course_documents->url}'>{$p->course_documents->name}</a>";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment