NWI Designs Blog

My blog is dedicated to my clients and partners with several categories that talk about everything from website marketing, online business, SEO and everything in between. If there is something you would like me to blog about and don't see it here, please let me know and I will try and get you the information you are looking for.

Filter all Articles Within Nested Categories in Joomla 1.7

Posted by Kevin
Kevin
If you are searching for a new web developer with expertise in project coordination and team building, we shou...
User is currently offline
on Saturday, 10 December 2011 in Joomla!

It has been a real pain to work with the articles that are nested inside sub categories in joomla 1.7. Why this was overlooked is still a mystery but one we should expect with this new nested category structure. The problem is when you filter a category in the article viewer, the only articles that currently show up are those that are in the selected category. If you want to see articles that are nested in the sub categories in the one you are viewing you have to select each category one at a time to see the other articles.

There is a core hack that works to show all articles inside of a category and all the articles that are in sub categories. We need to open the articles.php file that is found in administrator/components/com_content/models folder. Navigate to line 190 or if your editor does not support line count, look for //Filter by a single or group of categories. code hint.

NOTE: Dont be confused as there are two files (article.php) & (articles.php) so make sure you choose the right one (articles.php)!

 

From here we need to find the following bit of code:

 

$query->where('c.path like (select concat(path,"%") from #__categories where id='.(int)

 

And replace that line with this:

 

$query->where('c.path like (select concat(path,"%") from #__categories where id='.(int) $categoryId.')');

 

Once that is done when you select a category in the article manager all the articles in that category and all categories that are nested within it will now display.

 

Thanks to Per Yngve Berg for sharing this code with us;)

LINK

Rate this blog entry
If you are searching for a new web developer with expertise in project coordination and team building, we should meet. For the past 16 years I have been creating and implementing high performance strategies that directly influence development and effectiveness of small business websites. In addition to a solid knowledge of HTML/CSS and server development using cutting edge technologies, I also offer expertise in graphics design and advertisement marketing.

The qualifications and professional knowledge I can bring to your organization include: Solid expertise in systems and product design; development and marketing; and troubleshooting. Verifiable success in creating superior work and attention to simplicity of structure, leading to highly reliable and maintainable websites. Consistent contribution to the successful completion of all assignments on time and within budget. Excellent interpersonal and communication skills – public speaking, writing and building cohesive teams.

My project coordinating talent, technical expertise and team building abilities have contributed to a number of successful website projects. The link below to my resume outlines my credentials and accomplishments in detail.
Trackback URL for this blog entry

Comments

No comments made yet. Be the first to submit a comment

Leave your comment

Guest
Guest Monday, 21 May 2012

Latest Post

  • There has never been more whispers (both jokingly and not), that SEO is dead. Which leads me to… The Number One Question People Are Asking: What Did This Update Do and How Do I Recover? (By Readin
  •   Groundwork for How I Organize Content for a Web Project Main Content Articles: These are the key point articles that are going to be used as main menu navigation elements and selling points fo
  • HOW TO DETECT ERRORS? If your website does not work as you expect when you click something or an animation stopped working, this could be the result of a script error. In case of an error the scrip
  •   When you first login as your fan page today, you will see a notification at the top of your page informing you about the changes. The pages will take full effect on March 30th, and in the meantim
  •   When Joomla or any software for that matter posts a critical updates it is like a newspaper headline telling all hackers where the vulnerability is. So even if they did not know it existed before