Using class.set in Template with no success

Using the class.set statement as I follow the How do I create classes for the published TH and TD elements? | Sailwave guide but can’t get the classes to apply to competitor fields in the summary table.

I can get the race column class to work:
class.set("summary.col.race.td", "col-race")

but can’t get it to apply to other td elements:

class.set("summary.col.rank.td", "col-rank")
class.set("summary.col.HelmName.td", "col-helmname")
class.set("summary.col.club.td", "col-club")
class.set("summary.col.nett.td", "col-nett")

Thoughts from the group?

Hi - Could you explain a bit more about what you are trying to achieve and I’ll try and help you

Regards

Jon

Thanks Jon,

Trying to get classes applied to each TD in a column so I can control for of the css formating. My understanding is that the above code should place the class=“col-rank” inside each td of the Rank column etc. but the classes are not being applied into the competitor fields.

Hi Matthew,

Please can you provided the CSS for the various classes shown?

Are you defining the CSS in a custom style or have you modified a Sailwave style?

You might like to have a look at the code in this page created by a Dutch Sailwave user to see if it helps.

Kind regards,
Huw

Hi,
Just to clarify, where are you putting these? I which file?
It depends upon what command you are using to publish with.

Are you using Publish results or Publish ResultsV2

Have you looked at the ResultsV2.htm included as standard
These use string.set("summary.col.race.rank3.td", "rank3")
as an example. Looking at the source code you should be able to use either string.set or class.set
I can see the documentation does say class.set but all the working code is using string.set.

Perhaps you could give an example of what you wish to achieve and I’ll see if I can check it out for you. I am however, very shortly off to Turkey to score the Techno World Championships. so a little short of time.