By Catpriest on
How do I get rid of the 'There are currently no posts in this category.' + XML icon ?
Because a situation I often have on my website is that I associate a page or a story with a certain taxonomy term, without adding further content to it as well.
You then get situations like this :
http://dreamgate.studentenweb.org/audio-dramas
How do I solve it and / or get rid of the 'There are currently no posts in this category.' + XML icon ?
I have found this question in another forum topic, but no one replied, so that's why I ask it here again ...
I would be very greatful !
Thanks !
Comments
What do you want it to do?
What do you want the system to do when a user selects an empty category? Changing the "There are no posts" message is trivial -- open up the taxonomy.module and change the string.
Redirecting the user to a different URL is only slightly more complicated; just use a drupal_goto() to the URL desired.
--R.J.
http://www.electric-escape.net/
--R.J.
Thank you
Redirecting won't be necessary, so i'll just edit the module
Uncheck "Show message if no posts"
I believe that if you uncheck "Show message if no posts", in the "Category display settings" for the container, you will no longer receive that message.
Alternatively, you could comment out this line of code in the category.inc file:
I get this message even when
I get this message even when there is content in that category, when access is set by taxonomy access it just pretends there are no posts even though there are, i find this very odd behavior or it will show an empty article category even though article do exist. But now with books its different it properly displays the menu and when you click it says you do not have access but for other items it just makes it appear empty.
=-=
enable the locale.module (part of core)
create a site specific language
find the strings in drupal you want to change.
documentation on doing this found here: HOWTO: Creating a customized language set to replace Drupal terminology
Doing it this way avoids updates or upgrades overwriting your changes to text strings.
Therefore you can find 'There are currently no posts in this category' and change it to 'You don't have permissions to see this forum'
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
that tutorial is about
that tutorial is about changing language only, i tried the manage strings function in the module but it doesn't pull up anything
=-=
Yes it is about changing language, and that is exactly what you are doing you are creating a site specific language rather then a spoken/written language variation.
anything wrapped in a t() can be changed with the locale.module. I've used it many many times to change specific strings in drupal that are wrapped in t().
My guess is you did not follow the instructions exactly as they are laid out and you should give it any go round.
After the empty site language is created you must follow the remainder of the instructions:
Thus you must visit pages after the site language is changed and this is what picks up the t() strings and allows you to change them in the manage strings area.
If you jump immediatley to manage strings without visiting any pages, it's no wonder that it was blank!
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
Thanks for the great tip!
The docs page you mentioned (http://drupal.org/node/24593) worked like a charm.
Thanks for the great tip ... Can't wait to mangle other t() stings!