diff --git a/src/IDF/Template/Markdown.php b/src/IDF/Template/Markdown.php
index 6fc0666..23a3384 100644
--- a/src/IDF/Template/Markdown.php
+++ b/src/IDF/Template/Markdown.php
@@ -60,7 +60,7 @@ class IDF_Template_Markdown extends Pluf_Template_Tag
and !$this->request->user->isAnonymous()) {
return ''.$m[1].'';
}
- if (!$this->request->rights['hasWikiAccess']) {
+ if (!$this->request->rights['hasWikiAccess'] or $pages->count() == 0) {
return $m[1];
}
return ''.$m[1].'';