I have use 6.x-2.0-dev (File date May 1, 2010). It works great but when I upgraded to RC1, I found that block theme is not the same as other blocks.

From what I look at the HTML, I found that new code specify more id, class and override default theme block.

6.x-2.0-RC1

<h2 class="title block-title"></h2><h2 class="title" id="ajax-cart-headline"><a href="#" id="ajaxCartToggleView">Shopping Cart</a></h2>

6.x-2.0-dev (File date May 1, 2010)

<h2 class="title block-title">Shopping Cart</h2>

Is there anyway to replace all id and class with [ class="title block-title" ] so that the theme for Ajax Cart block will look the same?

Thank you,

Comments

There was a bug when standard block title was overriden. This change comes from that bug fix. The double h2 tag comes from a bug from Drupal, if I remember correctly.

I guess 'block-title' class needs to be added to fix. Right?

Just put "block-title" into class like below should do it (Tested it with Firebug) :

<h2 class="title block-title"></h2><h2 class="title block-title" id="ajax-cart-headline"><a href="#" id="ajaxCartToggleView">Shopping Cart</a></h2>

Thank you,

Oops, the double h2 is not a Drupal bug, is an UC Ajax Cart bug. Once fixed markup is:

<h2>
  <span class="title block-title" id="ajax-cart-headline">
    <a href="#" id="ajaxCartToggleView" class="ajax-cart-processed">Shopping cart</a>
  </span>
</h2>

I think this is ok.

Just tried to put the code you suggested but that didn't work. Below is what I use in Firebug. It's the same but with different order.

<h2>
  <span id="ajax-cart-headline" class="title block-title">
    <a id="ajaxCartToggleView" class="ajax-cart-processed" href="#">Shopping cart</a>
  </span>
</h2>

Code will work. Take into account that some process is done when page is loaded, so if you change code after will end in a differnet situation than if this code is in page since load. Also, some JS handlers are attached in some elements, so if you modify DOM those handlers may be lost.

Anyway, there's no difference in HTML atribute order, so it must work.

It's commited to dev, you can test it ;-)

Status:Active» Closed (fixed)

Just tested dev and it works. Thanks a lot :)