Hi, I have a site running Drupal 7, and your module would be useful for it. Are there any plans for a D7 port?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

richardlazear’s picture

Assigned: richardlazear » Unassigned
gabrielu’s picture

Good question, I am planing for a while a D7 port, but didn't had the resources for this.
But the answer is yes, I hope for a complete D7 port in the following weeks.

droath’s picture

I just came across this module today. I really needed to incorporate this module into my Drupal 7 sites. So I started porting this into Drupal 7. I have tested it, and it seems to be working great. (I have attached the D7 module for review below). I would like to suggest that we take advantage of the Drupal 7 accessibility classes (element-hidden and element-invisible) instead of inputting a empty string for the title. This way the title it still accessible by screen readers, search engines, ect. What do you think?

Great module by the way!

Everett Zufelt’s picture

I haven't used this module, but did read its description.

@droath, can you please propose a use-case in which a screen-reader user would need to have access to the node title, where sighted users would not. I am not disagreeing with you at all, I am just not familiar enough with the practical usage of the module to make a call on this.

Thanks.

droath’s picture

Everett Zufelt, here is some more information on this topic.

http://drupal.org/node/561750

Let me know if you need anything else.

gabrielu’s picture

I think the discussion about screen readers support can be moved to another thread.
In my opinion both approaches are ok.
For now the title is completely removed, because if a sighted user does not need to read the title, why would a screen reader need to access it?

See http://drupal.org/node/1058336

gabrielu’s picture

Status: Active » Needs review

Please see the 7.x-1.x-dev release http://drupal.org/node/1058390
Please review the release.

gabrielu’s picture

Version: 6.x-1.1 » 7.x-1.x-dev
droath’s picture

@gabrielu

I fixed a minor bug and added the accessibility feature for the drupal 7 dev release.

Fixed bug:
If you added a nid on the exclude node title configuration page. Then you try removing that current nid by unchecking the "Exclude title from display" checkbox, on the node edit form. It won't successfully remove it.

Added feature:
Its up to you if you want to include this or not. I have added the option to the admin section, so the administrator can configure to hide the titles using CSS. This does required an extra step, which I don't think can be avoided (suggestions welcomed). These requirements include adding a predefined variable ($exclude_node_title_class) to the title class attribute for both the node.tpl.php and page.tpl.php.

Examples:

page.tpl.php

<?php if ($title): ?>
  <!-- Title -->
    <h1 id="page-title" class="title <?php print !empty($exclude_node_title_class) ? $exclude_node_title_class : ''; ?>">
       <?php print $title; ?>
    </h1>
<?php endif; ?>

node.tpl.php

  <?php if (!$page): ?>
    <h2 class="<?php print !empty($exclude_node_title_class) ? $exclude_node_title_class : ''; ?>" <?php print $title_attributes; ?>>
      <a href="<?php print $node_url; ?>">
        <?php print $title; ?>
      </a>
    </h2>
  <?php endif; ?>
gabrielu’s picture

Status: Needs review » Needs work

Hey,
Thanks for you patch, maybe if you can provide a separate patch for the bug.

As for the CSS class, I would like to find a more easy way, I'm not that confident in altering theme files when installing a new module, maybe we can find another solution we can rely on. I say we keep this discussion open.

Thanks,
Gabriel

gabrielu’s picture

I added the bugfix to the CVS, should be fine in next, dev snapshot.

gabrielu’s picture

Status: Needs work » Needs review

I fixed several issues on 7.x-dev branch. Let me know if we can proceed to a 7.x-1.0 release.

Gabriel

droath’s picture

@Gabriel
I just tested out the newest 7.x-dev branch, and it seems to be very stable. Haven't found any bugs so far, I would say we could proceed with a 7.x-1.0 release.

gabrielu’s picture

Status: Needs review » Closed (fixed)

Great,
Stable here, too. I will prepare a new release for 7.x