Joomla! is a fantastic tool that provides a standardised look and feel to your website, which you can change through the use of templates and/or menu options.
However, I have a minor irritation with the way 'Category Lists' are displayed in version 1.5. Under certain circumstances the 'Filter', 'Display #' and 'Article Title' fields would always appear, regardless of any settings specified in the Menu Options.
Let me give you an example:
- I define a top-level 'Menu Item' with a 'Section Layout' type.
- I then defined another 'Menu Item', this time with a 'Category Layout' type.
- I subsequently set Title, Filter and Pagination to 'Hide' in the Menu Item options.
The top-level menu shows the Categories available, as a list, in the main view and also presents a new side-menu with the same Categories to aid future navigation. So far so good - the Categories can be clicked directly in the main view or via the side-menu - they should both send you to the same place.
However, now the problems start to appear - if I use the side-menu things aren't too bad. The fields I asked to be hidden (Title, Filter, Pagination) do not appear (although there is still an index-number listed to the left of each element which I don't like).
Things get much worse though if I avoid the side-menu and click on the Category title directly instead - this should have the same effect as clicking on the side-menu, but it actually renders quite differently. Instead I see all the fields I'm trying to hide (Title, Filter, Pagination)!
I referred to Google, but couldn't find any immediate answers, so I started looking at the Joomla! code. What I wanted was to never show any headings on a Category List view anywhere on my site - as it turns out this can be achieved quite easily with a couple of well placed comments in the core code...
I realise that changing the core Joomla! code is not recommended, but I could see no other way of solving the problem - here's how.
First you need to gain access to the Joomla files on your website - I have the ability to login directly using SSH, but you should be able to achieve the same result via FTP if necessary (using get, edit, then put).
The file you need to change is in the following directory:
./components/com_content/views/category/tmpl/default_items.php
*** default_items.php.original
--- default_items.php
***************
*** 13,18 ****
--- 13,19 ----
</script>
<form action="<?php echo $this->action; ...
<table width="100%" border="0" ...
+ <!--
<?phpif ($this->params->get('filter') ...
<tr>
<td colspan="5">
***************
*** 64,74 ****
--- 65,78 ----
<?php endif; ?>
</tr>
<?php endif; ?>
+ -->
<?php foreach ($this->items as $item) : ?>
<tr class="sectiontableentry<?php echo ...
+ <!--
<td align="right">
<?php echo $this->pagination ...
</td>
+ -->
<?php if ($this->params->get('show_title')) ...
<?php if ($item->access ...
<td>
Don't worry if the above doesn't make sense - all it's saying is that you need to add (this 'plus' signs) two sets of HTML comments (the '<!--' and '-->' bits). The first comment starts at line 16 and finishes at line 68, while the second comment starts at line 71 and finishes at line 75.
All this change does is comment out the PHP code and XHTML tags that generate the Title, Pagination and Filters fields, as well as removing that annoying index number that was appearing to the left of every item.
If anyone knows a cleaner way to do this using the Joomla! CMS then please let me know.
You're right... what a noob I am.
Just fixed it and worked fine. I'll try now the override option.
I suspect you've cut/pasted the code above, complete with '+' characters. However, these plus signs are for illustration only and are not part of the code! They simply show where new content has been added by placing a '+' sign in front of them...
Remove the '+' signs from 'default_items.php' and you should be OK.
Having said that, you may wish to consider using 'overrides' (as suggested above by Kristo Tuisk), but this may depend on the version of Joomla you're using.
I just followed what you've suggested and and changed the code. Pagination, filter field and index numbers are gone, but now I've some "+++++" signals between the category description and the articles. Where is my mistake?
thanks
"params->get('filter') || $this->params->get('show_pagination_limit')) : ?>"
Now my Problem ;-). Even though I can see the params 'filter' and 'show_title' etc. and have even created param options in the templateDetails.xml thus getting them into the params.ini file in my template root, nothing happens. I still get the bl**dy filter and header.