• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

How to push data from backend to frontend?

Scheduled Pinned Locked Moved Unsolved Plugin Development
nodebbpluginbackendfrontenddevelopment
3 Posts 2 Posters 618 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • dogsD Offline
    dogsD Offline
    dogs
    wrote on last edited by
    #1

    Hey everyone!

    I'm still playing with building Plugins for nodebb.
    So I used the YouTube API to get some links and data to play with.

    How is it possible to push the data to the frontend received by the backend in nodebb?

    I have data in Variables:

    
    let videoID = data.items[i].id.videoId;
    let videoURL = "https://youtube.com/watch?v=" + data.items[i].id.videoId;
    let videoTitle = data.items[i].snippet.title;
    
    

    I want this data to send out to the frontend like:

    <div>
    videoID1
    videoURL1
    videoTitle1
    </div>
    
    <div>
    videoID2
    videoURL2
    videoTitle2
    </div>
    
    ...
    

    Can you give me sime tips or some links to archive back/frontend rendering?

    Thank you in advance! 🙂

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to dogs on last edited by
    #2

    @pasib where do you want it to show up? You could render it to a new route or as a widget.

    1 Reply Last reply
    0
  • dogsD Offline
    dogsD Offline
    dogs
    wrote on last edited by
    #3

    @PitaJ I want to display it on a existing page e.g on users profile page.

    What do I have to to, to add it to an existing route? E.g /user/pasib

    Could you give me some links, or a little example how I cant add a simple backend variable to the frontend. 🙂

    Thank you

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development