We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Best way to parse REST/JSON for use in template!

How Do I?

captainahab's avatar
captainahab
22 posts
3 years ago
captainahab's avatar captainahab

I need to consume some data via REST and render it in a template, there seem to be no plugins or any other ee solution. Any recommendations? Thanks!

       
vw000's avatar
vw000
482 posts
3 years ago
vw000's avatar vw000

I’m not sure about a plugin because every API is different. Either way, if you get results in JSON this should be quite simple, no plugin required. You would just use the same code you normally inside your template.

A template can be JavaScript, or you can turn on PHP and use PHP to interact with the API. Or you can even just create a normal HTML post form that interacts with the requests.

It’s your choice. In case of REST, you can use any code that does standard http requests. You should first analyze how you want to manipulate or use the data to be able to see the best approach.

       
marcusramirez's avatar
marcusramirez
2 posts
one year ago
marcusramirez's avatar marcusramirez

If you need more advanced templating capabilities, consider using a templating library like Handlebars.js or slope game.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.