Lost Password?
  • Narrow screen resolution
  • Wide screen resolution
  • Auto width resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • red color
  • green color
Member Area

Web Code

Home arrow Joomla arrow Joomla Guides arrow Show empty categories in section     
Show empty categories in section PDF Print E-mail
Written by Administrator   
Wednesday, 02 April 2008

When using Joomla 1.0.x + (not 1.5), if you create a menu item linking to a section - this will list and link to the categories. In the Joomla admin you can select "show empty categories" - but this option wont always work.

To fix this problem find this file: /components/com_content/content.php

Replace this line [about line 326] :
  $access_check_content = "\n AND b.access <= " . (int) $gid;

With this line:          
  $access_check_content = "\n AND ( b.access <= " . (int) $gid ." OR b.access is null)";


Now you will see the categories inside the section even if there are no articles in them.

Related Items:

Write Comment

Code:* Code

Add as favourites (840) | Quote this article on your site | Views: 7689

Comments (2)
1. 15-08-2011 08:25
I'm not easily imrpeessd. . . but that's impressing me! :)
Written by Jetsyn (Guest)
2. 02-04-2008 11:09
good tip
thanks for that.
Written by Muhammad (Guest)
< Prev   Next >

Popular of Late