Skip to content
  • 0 Votes
    1 Posts
    1k Views
    D

    I need to show some text but this texts is saved with a label that increase: for example

    var save={'0':'first text','1':'second text'};

    now I need to show this text in my tpl page so in my controllers I pass this vector to page. My problem is: how can I read the value in the vector with begin and with end??is it possible or not?

    <!-- BEGIN posts -->
    <!-- END posts -->

    and I try to use in the IF some regex expression?

  • Which hook should I use?

    Solved Plugin Development
    3
    0 Votes
    3 Posts
    2k Views
    NivixN

    Thank you @baris! I totally forgot about this. I've included my code for future reference.

    $(document).on('click', '.my-class', function() { // do stuff });
  • 0 Votes
    4 Posts
    3k Views
    P

    Like this?

    https://github.com/NodeBB/nodebb-widget-essentials/blob/master/public/templates/widgets/activeusers.tpl

    This pre-renders the list of active users from server data. And then has some inline JS with socket call to update the list as new users become active