Hi,

I have just started using this module and so far I am loving it. With one exception: The titles often simply do not fit, depending on what you are displaying. Example: Let's say I have a vocabulary "cities" and use taxonomy_vtn to display all pharmacies sorted by city. In such a case the title "Pharmacies in Vienna" would be a lot easier to understand and clearer to the visitor than the title "Nodes for Vienna" (same for e.g. "Pharmacies by city" instead of "Terms in cities").
e
So ideally one could set custom titles for each vocabulary.

I am aware though that not every single specific feature request is worh to be implemented.

So I'd be very happy if someone could point me to the right line in the module which I need to remove in order to completely hide the titles for taxonomy_vtn pages.

(I really hope I have not missed something. But after seacrhing the queue without a solution I though it would be ok to just ask...)

Many thanks in advance!

Comments

AlexisWilke’s picture

I suggest you try disabling the "User Friendly Titles" checkbox. That may give you a result that is already more appropriate.

Now I do agree that the titles should be better. In regard to the terms, it would be one entry in the taxonomy (assuming you don't use a per letter or some other grouping.) In regard to the nodes, you'd have to edit each term to define the title for that one term (the taxonomy could have a default name though.)

To hide the titles, you'd need to use CSS because it uses the default Drupal title. A simple:

h2, h3 { display: none; }

would do it, but it would do that to all pages! So that's probably not what you want.

There is another request in regard to getting a hook_theme() which would solve this problem. Then you'd just have to overload the title hook and be done with it...

Anyway, if you look into the code, in the taxonomy_vtn.pages.inc, you will find things like drupal_set_title() and variables named $title.

Enjoy!
Alexis Wilke

scotthoff’s picture

Hey,

I tried to get around this issue by doing a theme override. The following code worked:

          <?php if ($title or $tabs): ?>
            <div id="main-content-header">
              <?php if ($title): ?>
			  <h1 id="page-title">
			  <?php 
			  $fixed_title = str_replace('Nodes of term ','',$title);
			  $fixed_title = str_replace('Terms in Word Group ','Word Groups',$fixed_title);
			  $fixed_title = t(trim($fixed_title)); 
			  ?></h1>
			  <?php endif; ?>
              <?php if ($tabs): ?>
                <div class="local-tasks"><?php print $tabs; ?></div>
              <?php endif; ?>
            </div>
          <?php endif; ?>

The real part that does the clean up is:

<?php 
$fixed_title = str_replace('Nodes of term ','',$title);
$fixed_title = str_replace('Terms in Word Group ','Word Groups',$fixed_title);
$fixed_title = t(trim($fixed_title)); 
?>

In this case, I wanted to Replace "Terms in Word Group" to "Word Group"

to get the theme override to work, I used the following file name:
page-taxonomy_vtn.tpl.php

The First replacement just says, I don't want to see "Node of term" I just want to see the appropriate term name.