Adding organizers to month view tooltip and mobile

Home Forums Calendar Products Events Calendar PRO Adding organizers to month view tooltip and mobile

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1007655
    pickleshy
    Participant

    We added the organizer (in our case, performer), to the list view of the events. We also added it to the tooltip and mobile list for the month view. Now that we can have multiple organizers for an event, we’d like to list them all. We have it working for the list views, but when we tried to add multiple organizers to the tooltip in month views, we had problems.

    Ideally, we’d add something like this:

    [[ for (var i =0; i < organizers.length; i++;) { ]]
      [[ var organizer = organizers[i]; ]] 
      <span class="lmp-performer">[[=organizer]]</span>
    [[}]]

    But with that in, the tooltip doesn’t work. We’ve done some digging and observed the following behavior:

    Adding

    [[ for (var i =0; i < organizers.length; i++;) { ]]
    [[ }]]

    also breaks the tooltip, but when we add

    [[ for (var i =0; i < organizers.length; i++;) { 
     }]]

    the tooltip still works, but displays "for (var i =0; i < organizers.length; i++;) { }" in it. So it seems like your parser doesn’t handle the JS for loop correctly.

    Also, we confirmed that the organizers variable does exist; adding this code with no for loop works as expected:

    [[var org =organizers[0];]]
    [[=org]]

    Is there another way to display the organizers without the for loop? This is pretty simple JavaScript, so we expected it to work. What are we missing?

    • This topic was modified 8 years, 7 months ago by pickleshy.
    • This topic was modified 8 years, 7 months ago by pickleshy.
    • This topic was modified 8 years, 7 months ago by George.
    #1007960
    George
    Participant

    I’m sorry @pickleshy, we unfortunately do not offer support for helping out with custom coding. I mention this because the issue may not be the parsing of JavaScript in the file because the file itself doesn’t parse anything, it outputs the script in HTML script tags and the browser then parses it all.

    The issue might instead be related to how the organizer data itself is served up to your mobile tooltip template. If you’re adding it as an array, another method for looping over an array of items than your method might work better here. A great summary of alternatives can be found here → http://stackoverflow.com/a/9329476

    I’d recommend trying out alternatives for looping over organizers like in that link – otherwise, if you’re unable to get this customization working the next best thing I can recommend is to hire a developer for further custom development work.

    Best of luck with your site!

    George

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Adding organizers to month view tooltip and mobile’ is closed to new replies.