Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Trying to add my_class for a block i get this code
<div id="block-block-3" class="block block-block promote promote_first contextual-links-region" my_class="">
block.tpl.php
<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?><?php print $block->css_class; ?>>
with this problem the module is not usable at all....
Comments
Comment #1
redhatusr CreditAttribution: redhatusr commentedComment #2
redhatusr CreditAttribution: redhatusr commentedComment #3
DYdave CreditAttribution: DYdave commentedHi redhatusr,
Thanks very much for reporting this issue and providing a few more details.
According to the code description you have given:
Could you please try replacing this code with the following?
(maybe the space character between the
$classes
and$block->css_class
is not necessary... to be tested)Feel free to report back if it works or not, I would be glad to try suggesting other solutions for your template code if this one doesn't work.
I would be curious to know what theme you would be using, could you please let us know?
I hope I was able to answer your question, but feel free to let me know if anything would be unclear, I would be glad to suggest other solutions.
Thanks very much to all in advance for your feedbacks, testing and reporting.
Cheers!
Comment #4
DYdave CreditAttribution: DYdave at DAVYIN Internet Solutions / 戴文信息科技有限公司 commentedNo feedback on this support request for more than 2 years.
I would assume an appropriate solution should have already been found by ticket's author.
Additionally, no one else reported any issue that could be similar.
Therefore, I allowed myself to mark this issue as Fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with the approach suggested in this ticket (we would surely be happy to hear your feedback).
Please let us know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the suggested solution, this comment or this ticket in general, we would be glad to provide more information or explain in more details.
Many thanks to everyone for your great help, reviews, testing, reporting and participation in this module's issue tracker.
Cheers!