Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Sign in to follow this  
david.svoboda

Changing text in Events thumbnail

Question

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*

Snímek obrazovky 2020-02-07 v 11.17.45.png

Edited by david.svoboda
added code

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in to follow this  

×
×
  • Create New...