Forum

Thread tagged as: Question

Getting Region Fields through AJAX

Hi guys,

I'm currently building a site that has a Portfolio section built into the homepage, and a big Canvas element above it that displays two pictures, a title, and other text.

The trouble is that all of the Portfolio pieces are in a single multi-item region on the homepage, and the thumbnails only display the summary of each one. How would I go about replacing the information in the canvas element with information from each Portfolio item when it was clicked?

I'm assuming AJAX has to be involved.

Thanks, Harry

Harry Ray

Harry Ray 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How would you do it if you were building static HTML pages? If you figure that part out it's usually very easy to implement the CMS aspect.

Hi Drew,

Admittedly, I'm still working on that bit!

However, I'm really asking whether it's possible to make a call similar to perch_content_custom() and return that information without having to refresh the page (e.g with AJAX)?

Turns out, you can use AJAX to get regions in Perch.