Page 1 of 1

How to hide filter and display # in Category

Posted: Mon Feb 11, 2008 5:24 pm
by dodgingspam
I have create a section and linked it to a menu. Type Articles ยป Section
When clicked it displays a list of categories. I was able to remove filter above those categories, but now when you click on a category and get a list of articles I can't seem to be able to figure out where to turn off filter above those article.

Need help.

???

Re: How to hide filter and display # in Category

Posted: Wed Feb 13, 2008 9:03 am
by Nathan_Madness
Hey if it is the article index that you are seeing you can turn that off in the plugin.
Extensions>>Plugin Manager>>Content-Pagebreak.

Re: How to hide filter and display # in Category

Posted: Sat Feb 16, 2008 12:21 am
by stacy_w_decker
I've got the same issue and that did not correct the issue.
Under com_content I can modify the code (html/com_content/category/default_items.php) and show that it is used in both cases.

The links for the menu item and then the category display are different and this may be the right area but the params are not being picked up under the second scenario.

thanks
stacy

Re: How to hide filter and display # in Category

Posted: Sat Feb 16, 2008 8:10 am
by sm2195
Hi, did anyone manage to resolve this issue. I have the same and cannot figure out how to fix it.

Any help please?

Re: How to hide filter and display # in Category

Posted: Sat Feb 23, 2008 2:29 pm
by PhilOSparta
I am also searching for a fix to this, and I will post back here if I find anything.

Re: How to hide filter and display # in Category

Posted: Sat Feb 23, 2008 5:29 pm
by stacy_w_decker
One programatic option that I came up with was to add parms to the template I'm using for Filter, Display and Heading. I added 3 radio type parms to the templateDetails.xml with default values of 0. 0 being No and 1 being Yes. I then modified the templates\[your template name here]\html\com_content\category\default_items.php logic for the Filter, Display # and Table Heading sections.
...see code below...

$this->parms->get... is used to read in the parameters set in the parms.ini file stored at the [your template here] root.

I'm looking at other options as well and this is an all or nothing type of fix.

stacy

Code: Select all

<form action="<?php echo $this->action; ?>" method="post" name="adminForm">

<?php if ($this->params->get('showFilter')) : ?>
<div class="filter">
...
</div>
<?php endif; ?>

<?php if ($this->params->get('showPageDisplay')) : ?>
<div class="display">
...
</div>
<?php endif; ?>

<table class="category">

	<?php if ($this->params->get('showTableHeadings')) : ?>
...

Re: How to hide filter and display # in Category

Posted: Mon Feb 25, 2008 7:42 pm
by rfclift
Thank you very much for your solution Stacy. It solved my problem.

I just want to clarify for others what files were modified, because your last post is a bit confusing.

Put Stacy's code in the file:

\components\com_content\views\category\tmpl\default_items.php

Then edit your template parameters file:

\templates\[name of template]\params.ini

and put in the new parameters:

showFilter=0
showPageDisplay=0

A value of '0' deactivates display of these items, and '1' activates them.

I hope the development team will be able to repair this. There are similar problems in other areas with not being able to access parameters for categories if you get to them through a section menu item.

Re: How to hide filter and display # in Category

Posted: Mon Feb 25, 2008 8:07 pm
by stacy_w_decker
Sorry for the confusion.
I have also found that if the new parms are not defined in the templateDetails.xml for your template that they will be lost in the parms.ini file when/if you save anything in the template via the Joomla Administration Template Editor.

[joomla_install]\templates\[your_template]\templateDetails.xml - template install and configuration information.

Example parm in templateDetails.xml

Code: Select all

<parms>
        <param name="showFilter" type="radio" default="0" label="Show Filter Field" description="Used to Show or Hide the Filter Field">
            <option value="0">No</option>
            <option value="1">Yes</option>
        </param>
</parms>
There is a document that discusses this in much more detail coming down the pipe and it looks like it will be stored under api.joomla.org. I don't know when it will be made available for general consumption.

Stacy

Re: How to hide filter and display # in Category

Posted: Mon Feb 25, 2008 8:24 pm
by rfclift
Thanks Stacy.

I had manually edited the params.ini file and so didn't run into that problem.

I've fixed the templateDetails.xml file to add the showFilter and showPageDisplay parameters and my template configuration in the Joomla backend also works well now.

Thanks Again!

Rob

Re: How to hide filter and display # in Category

Posted: Thu Feb 28, 2008 10:11 am
by maniac69
Hi !
I'm not a programmer so I have some problems with the solution provided by Stacy. So maybe someone can explain me (and maybe other readers) how to proceed with hiding filter and display# within the category list.

I understand that I have to add the code into the file default_items.php. But where ? Can I add it on any line in the PHP file ? I tried to add it just after the first occurence of the text:

Code: Select all

<form action="<?php echo $this->action; ?>" method="post" name="adminForm">

and replaced that line with the complete text from Stacy. I added also the 2 parameters into the params.ini and added the <parms> part to the end of the templateDetail.xml
But then I get an error. :-\

Is it planned to eliminate the issue in a future version ?

Re: How to hide filter and display # in Category

Posted: Thu Feb 28, 2008 1:39 pm
by radiant_tech
If I understand the main question posed here (getting the # column to not display), there is a much simpler solution that does not involve changing the core code.

Take a look at my post here.

As for keeping the filter from displaying, there is generally a Show/Hide setting in the menu item parameters that can be set.

HTH,

Re: How to hide filter and display # in Category

Posted: Thu Feb 28, 2008 6:52 pm
by stacy_w_decker
Again, sorry for the confusion on this subject. I'm a Senior developer and forget to speak/write in normal languages on forums ;)

A lot of my original information comes from this thread http://forum.joomla.org/viewtopic.php?f=428&t=227508 with explinations on how to override standard Joomla output with templates. Amy explains things much better than I and her examples started me in the right direction. I've also read thru three (3) new books available on Joomla 1.5 that discuss templates in much more detail than I can. I would say that templates are a simple subject for a developer and something that a non-developer can do with a little help. The rules are simple but the technobabble, i.e. php mixed with html, css, etc. can be a little intimdating. Using other templates, many are available now, as examples you should be able to achieve the desired output you are looking for.


More Links, mostly technical in nature.
http://forum.joomla.org/viewtopic.php?f=487&t=255233 - discussion about the new Template Parameters document.
http://dev.joomla.org/component/option, ... templates/ - api for Templates. Note that this is incomplete at this time.
http://docs.joomla.org/Defining_a_param ... etails.xml - Joomla doc on Template Params
http://docs.joomla.org/New_features_int ... _templates Joomla 1.5 feature document on Templates.

Hope this helps. If you have more questions I'll try to help as I can.

Stacy

Re: How to hide filter and display # in Category

Posted: Sun Jul 06, 2008 4:13 pm
by frost
This code seems good, but I can't work out where to put it within the php document? Anybody shed light on this please.
Thanks

Re: How to hide filter and display # in Category

Posted: Sun Nov 23, 2008 8:17 pm
by bachar
Hey I found out easier:
if the category is used on a menu you just have to edit the menu parameters. then you will be able to hide the pagination.
on basic parameters set #links = all
on Advance parameters set Pagination = hide
and the "Display #" filter will not be display

Re: How to hide filter and display # in Category

Posted: Fri Feb 06, 2009 4:51 am
by cschmidt
Thanks for all the info posted here. Related to what bachar said, that's a good solution, however, if you do that things won't show up in the default breadcrumbs trail correctly. Instead, your category will appear as if linked from the home page. At least, that's what happened in my case...

Re: How to hide filter and display # in Category

Posted: Tue Sep 06, 2011 2:37 am
by masterfred
I think it`s much more easier than this and doesn't need any code hacking at all :

Go to your menu item (the one that link to the contact page).

In the right tabs :

Open LIST LAYOUTS
Put this option at "HIDE"

- Display Select

That's it ...

Re: How to hide filter and display # in Category

Posted: Mon Jan 16, 2012 8:49 am
by medialabpro
I had this same issue:
1) To remove the filter dropdown, I used the same method as masterfred - use the parameters in the Menu Item settings: Set "Display Select" to "HIDE".
2) after I removed this Display Select, I still had the work "Filter" showing at the top of my Newsfeed Category page.
To remove the text "Filter", I went to /language/en-GB/en-GB.ini and removed the work "Filter" in between the quotation marks on lines 173 and 174 to:
JGLOBAL_FILTER_BUTTON=""
JGLOBAL_FILTER_LABEL=""

This worked for me.

Re: How to hide filter and display # in Category

Posted: Sat Sep 29, 2012 6:51 pm
by jed_keenan
In 2.5.7 I have a short list of articles, 10, and don't need a 'display #' function so have selected List Layouts Display Select Hide but... the outline box in which the 'display #' function is displayed remains behind. Its a minor, minor issue but its starting to stare defiantly back at me (and the site users of course). Most appreciated if anyone with an aerosol of Bug Off! could help.

http://www.bugspraycart.com/wp-content/ ... 741001.jpg