Single page API

Hi there!

Amazing work on the external API integration. I’m currently trying to synchronize an external marketplace to our website and so far it’s working great. However, now I’m at a point where I want people to click on one of the ads where it should open the specifics for this add. In short, I’m having my archive setup done, but having difficulties creating a single.
Is this possible at all? I mean the URL’s aren’t being made so I’m thinking something like a pop-up screen. If this isn’t best practise, please let me know. Maybe it’s better to implement WooCommerce and sync it like that.

Oh and another question. How do I add pagination to the data. The API returns about 80 results that I’d like to show on different pages.

Thanks!

Are you trying to link to these pages? Or display the page data in your site? If it’s a full URL, you can setup a modal that contains an iframe. If you want to link to another page you can setup another page, send a URL param to that page (EX /your-single-page?external_id={{dc:looper:field key="id"}}), Then on your page you can utilize that parameter through Dynamic Content ({{dc:url:param key="external_id"}}) grabbing any data you would need. Pokemon part 2 goes over query parameters briefly.

Pagination currently requires custom code unfortunately which we can help you out with through https://theme.co/one. It’s something we will eventually solve globally when we integrate Twig into Cornerstone. Dynamic Content docs here if that helps https://theme.co/docs/dynamic-content-api

Let us know if you have any other questions and have a great day.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.