Any HTML page using a JS API and a combination of {fields} and custom attributes can be populated by an external CMS. Thatâs also true for a Webflow page. I once had a website that was designed in Webflow and populated by a Drupal database.
There seems to be a CORS authentication issue trying to pull CMS content from my websitesâ CMS into my websitesâ pages. How can I GET CMS items without exposing the API end-point for PUT or other editing requests?
Thank you for your response Sam @samliew . Iâm trying to route the Webflow API through a Webtask mini-server to create an API to only GET info from my Webflow CMS and not edit it, i.e. so I can use Webflow CMS json objects in my client-side code without exposing my api key. My javascript ability is poor, although can you provide any ideas? Is this possible?
You want to use your Webflow project as a database for external use? That is certainly possible with the API provided.
Unfortunately Iâm not an âexpertâ so I canât really help you there. Should you need assistance with creating an application using the Webflow API, Webflow recommends contacting one of our experts listed here https://experts.webflow.com
@samliew Thank you Sam, I want to use Webflow CMS as a database for content on my Webflow site. E.g. Webflow CMS â Webflow API â Webtask Server (just for hiding the API key) â Webflow Site (GET requests to receive and display JSON objects from the Webflow CMS). Does that make sense?
Thank you, Sam @samliew. How would I dynamically fill an external slider with CMS items? Do you have a resource youâd recommend? Iâve found the options in the forms very limited.
A bonus of using the Webflow API for this is one could also add advanced server-updating functionality like having a CMS collection item expire (auto-delete itself) after a certain date, e.g. for auto hiding meeting announcement slides when said meeting is over.
It mostly depends on what slider plugin you are using. You can just use a collection list to âprintâ out all the necessary slide info onto your page, then based on the documentation of the slider plugin, initialise the slider with the correct options.
Thatâs the general workflow, I canât be specific as we do not have access to your project.
Like I said, you are over-complicating this. All this info (like an expiry date) can already be managed via the webflow CMS and no additional external app is required.
@samliew, thanks! Do you have a slider plugin youâd recommend for this case? Iâm looking for any example code for an external slider connecting with a âcollection list âprint[ed]â outâ
And thatâs cool you can tell the CMS to auto-delete items after a selected date. How would I set that up?
@samliew Thank you for curating this slider example. Iâd seen jblerouxâs solution although didnât realize he has a designer preview available, thanks! Sorry to have you search for me.
And thanks for the date-filtering on collection list tip! Thatâs most helpful.
If anyone has any example code for server-side processing the CMS API to a client side Webflow site, Iâd still like to learn that for edge-case client needs that may pop-up in the future. Thanks again though, Sam!
Excuse my ignorance, a lot of that looks like greek to me. Would it be possible to list each item in a collection, along with each of its field, in a list or in a table?