Hey there, I noticed that in the sidebar menu ( sidebar_nav.tpl.php ) in wetkit menu - there is either extra code that needs to be removed - or missing div element.

On line 35 I am seeing this
<<?php print $tag . $attributes . $id; ?>>

I think it is suppose to be this:
<div<?php print $tag . $attributes . $id; ?>>

Also at the bottom of the page on line 58 I see
</<?php print $tag; ?>>

I'm assuming its suppose to look like this since we cannot print tags inside a closing tag
</div>

I will create a patch momentarily.
There is also an issue with old markup in this, but I am going to open that as a separate issue.

Files: 
CommentFileSizeAuthor
#6 sidebar_menu_extra-2680619-6.patch10.15 KBsylus

Comments

aastrong created an issue. See original summary.

aastrong’s picture

sylus’s picture

Is the code not rendering correctly? This might be legacy from and older theme as don't look at those old templates recently.

That said the code is correct and this doesn't make sense to me:

<div<?php print $tag . $attributes . $id; ?>>

That will render as:

<div div class="" id="">

And

</<?php print $tag; ?>>

That is also correct as it will just render as

</div>
sylus’s picture

Status: Active » Needs work
sylus’s picture

Okay I took a closer look and see the problem. These are definitely legacy templates from adaptivetheme, you probably are using them because you have a custom mega menu implementation leveraging mini panels?

I'll align these templates right now and attach a patch.

sylus’s picture

Status: Needs work » Needs review
FileSize
10.15 KB

I still think there are a few odd things in these templates $content_attributes, not sure if it exists but fixed the tags issue and corrected the heading @docs

http://www.drupalcontrib.org/api/drupal/contributions!panels!templates!p...

sylus’s picture

Already pushed fixes to wetkit_menu, so let me know :)

sylus’s picture

I wonder if this is mini panels mega menu specific code?

 <?php if($display->title_pane == $pane->pid) : ?>

And not sure we need:

    <div<?php print $content_attributes; ?>>
      <?php print render($content); ?>
    </div>

Are these important in your menu renderings?

sylus’s picture

Nevermind the first case is actually important as is special logic when to determine to use h1. So only the second example.

  • sylus committed fc626fb on 7.x-4.x
    Fixed WetKit Menu for Issue #2680619: Sidebar Menu extra / missing tags
    
sylus’s picture

Status: Needs review » Fixed

I think the bulk of this is fixed, can file further issues for more refinements if missed anything ^_^.

aastrong’s picture

Awesome, thanks !

Status: Fixed » Closed (fixed)

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