My use case is this (and I would think pretty common). I want to build a hierarchical taxonomy structure and use it like a menu. The problem is, I don't want to put any content under the top menu items, I would like to just display the taxonomy description. The problem is, if I do this then I get this irritating "There is currently no content classified with this term" displayed underneath, and I can't see any way to get rid of it.
Can anyone tell me how to do this (or indeed if it is possible)?
Many thanks

Comments

summit’s picture

Hi,

Having exactly the same situation. How can I get rid of "There is currently no content classified with this term".

greetings, Martijn

summit’s picture

Hi,

I got rid of it using this module! http://drupal.org/project/taxonomy_display
Greetings, Martijn

johnv’s picture

johnv’s picture

Status: Active » Closed (won't fix)

The message "There is currently no content classified with this term." is the core standard message for empty terms.
- You can create a view for it - Views 3 has some template views for Terms.
- Use http://drupal.org/project/taxonomy_display, as Martijn does.

suvankar7’s picture

Please add the below code under "THEME_preprocess_page" function on templete.php in your theme folder

.

if(isset($variables['page']['content']['system_main']['no_content'])) {
unset($variables['page']['content']['system_main']['no_content']);
}

billstennett’s picture

In case it helps anyone I needed to do this on a site running Drupal 7.52. The code posted above did not work for me but it was very close. For me the 'no_content' variable which needed unsetting appeared two levels further down. See below for what worked for me.

// remove "there is currently no content classified with this term" message
function THEME_preprocess_page(&$vars) {
if(isset($vars['page']['content']['content']['content']['system_main']['no_content'])) {
unset($vars['page']['content']['content']['content']['system_main']['no_content']);
}
}