Skip to main content
Participant
Oct 3, 2019 2:38 PM UTC
Answered

variable content in a table

Is it possible to create a table layout with variable content?

I want to use the same table layout different times on my website, each with another image and also with different content.
The easiest way is to copy/paste the layout and change the content, but isn't there another solution? (with less coding and more flexibility)

 

 

 

This topic is closed to new replies. Start a new post to keep the conversation going.
Nancy OShea
Nancy OSheaCorrect answer
Community Expert
Oct 3, 2019 6:05 PM UTC

Tables are for tabular data, not layouts.   Nowadays, we use CSS to style content and make it look presentable on all devices (aka responsive web design).

 

To build sites dynamically with content pulled from a database, first find out which programming languages and databases your hosting plan supports.   Depending on what you need, commercial DW extensions are available for purchase from WebAssist or  DMX Zone.   See links below.

 

 

 

 

Nancy O'Shea— Product User & Community Expert

4 replies

Nancy OShea
Community Expert
Nancy OSheaCommunity ExpertCorrect answer
Community Expert
Oct 3, 2019 6:05 PM UTC

Tables are for tabular data, not layouts.   Nowadays, we use CSS to style content and make it look presentable on all devices (aka responsive web design).

 

To build sites dynamically with content pulled from a database, first find out which programming languages and databases your hosting plan supports.   Depending on what you need, commercial DW extensions are available for purchase from WebAssist or  DMX Zone.   See links below.

 

 

 

 

Translate
Nancy O'Shea— Product User & Community Expert
Legend
Oct 3, 2019 6:00 PM UTC

First you need to set up a local server, something like XAMPP:

 

https://www.youtube.com/watch?v=-f8N4FEQWyY

 

Then you need to pull information from the database using sqli:

 

https://www.youtube.com/watch?v=0YLJ0uO6n8I

https://www.youtube.com/watch?v=zpTlJ6dtOxA

https://www.youtube.com/watch?v=WGuyxGJW9hs&t=208s

https://www.youtube.com/watch?v=3T8bp9DlypU&t=433s\

 

Not exactly something you can learn in a few minutes.

Translate
Legend
Oct 3, 2019 2:51 PM UTC

You have not really supplied enough information. How many pages do you require? If it's many pages then that is when you should consider keeping all of your content in a database and pullng it from that to feed into the table. Sounds a bit like you have some repetitive 'product' pages going on, which would be suitable for this kind of workflow. It's a steep learning curve though.

 

If its just a handful of pages then its probably just as easy to duplicate the page and change the content.

Translate
elsdpAuthor
Participant
Oct 3, 2019 3:25 PM UTC

Thanks for the quick response!

I expect around 20 tables, spread over 3 or 4 html pages.

The idea of putting the content is a database sounds good.  Can you give me some more information? Or useful links?

 

Translate