dynamische Cards

Dit forum is bedoeld voor vragen met betrekking tot WYSIWYG Web Builder.
Post Reply
GudB
 
 
Posts: 24
Joined: Thu Jan 04, 2018 5:42 pm

dynamische Cards

Post by GudB »

Vraagje m.b.t. Cards.

Kan ik Cards-items uit een mysql tabel halen?
Zo nee...weet iemand een alternatief voor Cards?
User avatar
Pablo
 
Posts: 24707
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: dynamische Cards

Post by Pablo »

Je kunt geen cards dynamisch aanmaken, maar je kunt wel data uit een MYSQL database weergeven via een "CMS Card".

Als alternatief kun je de cards zelf via PHP genereren, maar dan moet je natuurlijk ook zelf de style toevoegen.
GudB
 
 
Posts: 24
Joined: Thu Jan 04, 2018 5:42 pm

Re: dynamische Cards

Post by GudB »

Oke, dat laatste gaan we proberen. Codex helpt me wel. Dank voor je antwoord.
User avatar
BaconFries
 
 
Posts: 6307
Joined: Thu Aug 16, 2007 7:32 pm

Re: dynamische Cards

Post by BaconFries »

Oke, dat laatste gaan we proberen. Codex helpt me wel. Dank voor je antwoord.
As you have mentioned codex for help the following is from Gemini. Can't say this will work as jus a suggestion.
Option 1: Use the Card Repeater with Data Tools (Recommended)
​Web Builder 21 includes the Card Repeater component, which acts exactly like a dynamic list. Instead of designing individual cards manually, you design a template for one card, and Web Builder duplicates it automatically for every row in your database.
​Set up your Data Source: You will need to use one of the built-in database extensions, such as the MySQL Connector v2 or the MySQL CRUD extensions (found in the Data Extensions Pack).
​Bind the Card Repeater: In the Card Repeater properties, set the data source to your MySQL database query.
​Map the Fields: Within the repeater template, map your card elements (Card Title, Card Text, Card Image) to the corresponding columns in your MySQL table (e.g., product_name, description, image_url).
GudB
 
 
Posts: 24
Joined: Thu Jan 04, 2018 5:42 pm

Re: dynamische Cards

Post by GudB »

Yes, could be working. I will see what is the better option but Thnx for your creativity.
Post Reply