david.svoboda Posted February 7, 2020 Share Posted February 7, 2020 Can anyone advise me on how can I access the month name inside the Event thumbnail so I can change the string to another one (localised to the language not currently supported by SQSP)? (see the picture) I managed to change most of the date instances in Events and Blog pages via datetime handle, but being a non-programmer I struggle with that thumbnail. Basically all I need is a function that will return a number of the month mentioned in the thumbnail (e.g. "3" for "MAR") --- missed bit od code marked below as ******* <script> var month=new Array(12); month[0]="LED"; month[1]="ÚNO"; month[2]="BŘE"; month[3]="DUB"; month[4]="KVĚ"; month[5]="ČER"; month[6]="ČVC"; month[7]="SRP"; month[8]="ZÁŘ"; month[9]="ŘÍJ"; month[10]="LIS"; month[11]="PRO"; Y.use('node', 'node-load', function(Y) { Y.on('domready', function() { Y.all('div.eventlist-datetag-startdate--month').each( function() { var mdate = new Date(this.getAttribute(************)); this.setHTML(month[mdate.getMonth()]); }); }); </script> *thanks* Link to comment
MichalLeonczuk Posted April 8, 2020 Share Posted April 8, 2020 Hey! I'm trying to solve the same problem. Any news here? Would you be willing to post the full CSS code to what you've been able to solve? Thanks! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.