Layout Parsing and Sessions issues.

  • 1
  • Question
  • Updated 4 years ago
  • Answered
Hi guys,

I have noticed that for all of the api functionality such as:
that the layout comes in a big brick.
I would like to update / add a few images using the API, but I can't figure out how to properly parse the layout. Nor can I find any additional documentation on how that would be possible.

Also I am having troubles with the Google Api (I will ask in the google forums as well) on storing a session. It seems like everytime the page is reloaded the session is lost. I have been fighting their api for the last 4 hours or so trying to save access tokens and such but can't figure out the correct method to make this happen. Would appreciate any help on both of these matters, especially the first one as I am really struggling to find a way to update the layouts using the ap due to the huge output of the layout in the json object.
Photo of Tyler Balaban

Tyler Balaban

  • 344 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Hi Tyler,

I think you can use JQuery parseHtml( to parse the layout. Then you can add elements to it.

I think my answer to the other question( should help you with session issue you stated here.

Let me know if you need any help. 


Photo of Tyler Balaban

Tyler Balaban

  • 344 Points 250 badge 2x thumb
I'll give it a shot and see how it goes.

There are scenarios where I update an image on the server.. example: as a path. Now if I upload a new 1.jpg and override the existing,  in the risevision backend, the only way the viewer is not going to see a cached version of the image is if I update the playlist and then publish it. Now If I attempt to simply publish using an api (almost like a refresh to grab the new image as opposed to the cache) it doesn't work. But there are plenty of cases where I don't actually want to edit the layout, and the api doens't allow you to do revisionStatus:1 <- says field is not editable. 
Please advise! Thanks so much