Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8195065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:00:36+00:00 2026-06-07T05:00:36+00:00

I am trying to build a spotify app that includes a playlist. I need

  • 0

I am trying to build a spotify app that includes a playlist. I need to provide additional columns to the playlist view. I cannot inject html into the view because the model overwrites the edits shortly after. Is there some way to add my own data to the playlist items? At the moment I have a hack in place that uses another <ul> beside the playlist view. This looks like an extension of the playlist, but lacks much functionality.

Update: Here is what I ended up doing. This was largely prompted by the comment below.

playlistModel = new models.Playlist();
    var playlistView = new views.List(playlistModel, function(track) {
    var myData = getDataFor(track.data.uri);
    var trackView = new views.Track(track,
            views.Track.FIELD.NAME |
                views.Track.FIELD.ARTIST |
                views.Track.FIELD.DURATION |
                views.Track.FIELD.ALBUM);

    var name = document.createTextNode(myData.name);

    var img = document.createElement('img');
    img.src = 'https://graph.facebook.com/' + myData.friendID + '/picture';
    img.className = 'friendPic';
    img.alt = 'facebook profile picture of ' + myData.friendName;

    var span = document.createElement('span');
    span.appendChild(img);
    span.appendChild(name);

    trackView.node.insertBefore(span, trackView.node.firstChild);

    return trackView;
});
$('#playlist').append(playlistView.node);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:00:38+00:00Added an answer on June 7, 2026 at 5:00 am

    I got this to work but I am not sure if it is a good and solid plan for production, as it will depend on internal data structures.

    //Code alters the list returned from views.List and appends a column with the text PLAY.
    var results = document.getElementById('idOfElementToDisplayListIn');
    var pl = models.Playlist.fromURI(playlist_url, function(playlist) {
            var list = new views.List(playlist, function (track) {
        var ntrack=new views.Track(track, 
               views.Track.FIELD.NAME |
               views.Track.FIELD.ARTIST |
               views.Track.FIELD.DURATION |
               views.Track.FIELD.ALBUM);
        var aNode = document.createTextNode("PLAY");
        ntrack.node.appendChild(aNode);
        return ntrack;
        });
        results.appendChild(list.node); 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to build a html table that only contains the table header and
I'm trying build an App Engine connected Android application and am having some problems
I have a std::vector< tr1::shared_ptr<mapObject> > that I'm trying build from data contained in
Trying to build dynamic output from json and using jq/template tmpl display rows/columns. Somehow
Im trying to build a query that will fetch all changed rows from a
I'm trying build a regex that will replace any characters not of the format:
Trying to build a plugin effect that will some what look better than this
im trying to build a form+attachment that needs to be send to email. Im
I'm trying to build a AlarmClock for Spotify and make Spotify play a song
Trying to build a Metro app using Javascript and having issues with IndexedDb. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.