Cannot know if completely suppressing this is possible (and show 'category-empty'), because 'until' or 'from' can be set and previous/next *may* give results). Adding a FIXME for that.
$this->doCategoryQuery();
$this->finaliseCategoryState();
$this->doCategoryQuery();
$this->finaliseCategoryState();
- $r = $this->getCategoryTop() .
- $this->getSubcategorySection() .
+ $r = $this->getSubcategorySection() .
$this->getPagesSection() .
$this->getPagesSection() .
- $this->getImageSection() .
- $this->getCategoryBottom();
+ $this->getImageSection();
+
+ if( $r == '' ) {
+ // If there is no category content to display, only
+ // show the top part of the navigation links.
+ // FIXME: cannot be completely suppressed because it
+ // is unknown if 'until' or 'from' makes this
+ // give 0 results.
+ $r = $r . $this->getCategoryTop();
+ } else {
+ $r = $this->getCategoryTop() .
+ $r .
+ $this->getCategoryBottom();
+ }
// Give a proper message if category is empty
if ( $r == '' ) {
// Give a proper message if category is empty
if ( $r == '' ) {