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.

Thank you Huw and Jon for your comments and suggestions. I ended up abandoning the need to put classes into each once I took a look at the Dutch page you suggested. I’ve now managed to get almost all the formating I wanted to work using variations on the CSS styles they used.

Key goals for the project for me was to get an appearance on a phone in portrait that gives an overview without having to scroll sideways, an ability to rotate the phone to landscape and see all of the race results and an overall style that meets the expectations of our media savy young sailors.

Hi Matthew,

Thank you for your update. Nice to know a pointer has given you some inspiration.

Take a look at

these results use an effect I have been working on for a long time and is close to general release. I do not claim all the credit as I have had support from Jon and two Sailwave users, especially one who has cleaned up the rough code I had cobbled together.

The effect used in the above sets of results is likely to be made available for download from Sailwave website when Jon is back from scoring the Techno 293 Worlds in Turkey. But I could send you a copy early; note it currently only works with series summary tables. I also would suggest if you do want to try this effect that you re-order the published columns, so that Nett Points and/or Points (total) are before the individual race columns.

Kind regards,
Huw