First of all, thanks for this module. It is very helpful!
I have some relatively minor problems with the validation of the html generated by the weblink.module.

The weblink.module outputs incorrect html when displaying a single-level links hierarchy on the main directory page.
in particular it outputs a <p> tag at the beginning of each link node teaser, enclosing the node <div> tags; also the <p> tag is not closed.
Beside the fact that nesting divisions inside paragraphs is not valid (x)html, I don't see the necessity for this. In fact, when changing line 314 from:
$node_html .= '<p>' . drupal_render($element);
to
$node_html .= drupal_render($element);
the page renders correctly.
Is this tag needed when rendering multi-level category hierarchies or anything else? if not, is it possible to remove it?

In addition, an empty unordered list is also appended to each category title in the table at the top:
<ul class="links_weblink_category_children"></ul>
I think this should contain the subcategories, but when there are no subcategories, an empty <ul></ul> desn't validate. Is it possible to add a conditional statement to function theme_links_weblink_category_children{} on line 249, to include the <ul class="links_weblink_category_children"></ul> only if subcategories are actually present?

Thank you!

Comments

bohz’s picture

Title: incorrect ( HTML rendering in weblink.module » incorrect HTML rendering in weblink.module

fixed a typo in the title

syscrusher’s picture

Assigned: Unassigned » syscrusher
Priority: Normal » Minor
Status: Active » Fixed

Both of your proposed changes have been accepted into the code for Drupal 6 and (with minor modification) Drupal 5 branches. This patch is included in today's official releases for D5 and D6 branches. Thanks for an excellent and helpful bug report.

Scott

bohz’s picture

Thank you Scott.
I wish I could do more.
Alas, for the time being, I am only able to read and not write PHP!
Carlo

syscrusher’s picture

@bohz: No need to apologize for not being a PHP coder. You submitted a cogent and well-researched bug report with reference to the specific functions that were causing the problem. That was extremely helpful, and no developer could ask for more. :-)

Scott

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.