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.
Hy. Its a nice Modul! :-)
Would it be possible somehow the "td-tags" add a separate class?
for example:
<td class="row_10 col_0 myClass">text</td>
Or can i do it with preprocess code?
Any ideas or code-snipets?
Comment | File | Size | Author |
---|---|---|---|
#9 | line_number_class-1608832-9.patch | 943 bytes | lolandese |
Comments
Comment #0.0
Bernsch CreditAttribution: Bernsch commentedcode
Comment #0.1
Bernsch CreditAttribution: Bernsch commentedtext change
Comment #0.2
Bernsch CreditAttribution: Bernsch commentededit text
Comment #0.3
Bernsch CreditAttribution: Bernsch commentedtext change
Comment #1
Bernsch CreditAttribution: Bernsch commentedHow can i add a separate class to "td tags"?
Who has proposed one solution? Thx
Comment #2
xcono CreditAttribution: xcono commentedI think, there is only hardcode solution for widget:
In function tablefield_field_widget_form under "Render the form table" comment:
Also you can use js.
Comment #3
Bernsch CreditAttribution: Bernsch commentedThanx xcono for this info.
Sorry i made a mistake. I would add a custom class to the "tr"-tags NOT to a "td"-tag.
In my table-nodes I would always lift the placement of my team.
The placement this is different from table(-node) to table(-node).
I would give my team one class to the tr-tag.
Some ideas how to implement this?
Comment #4
Bernsch CreditAttribution: Bernsch commentedHere is the solution via JS-Code:
It works for me! Thanks to yannickoo!
Comment #5
Bernsch CreditAttribution: Bernsch commentedComment #5.0
Bernsch CreditAttribution: Bernsch commentedtext change
Comment #6
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedThe suggested code changes/additions should be supplied as a patch.
Comment #7
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedComment #8
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedI guess this was a support request instead and is solved by the answers given (#2 and #4).
Comment #9
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedRequested is:
Attached patch takes care of adding a line-number class to the "tr"-tag resulting in the following output:
Still wondering the use case for this as the current possible:
..has the same effect as the newly possible:
Once that is clear it can be considered to be merged.