Using custom table data to populate a series of content pages?

Michael Purgar asked on June 4, 2019 21:34


We currently have a custom table populated with data feeding and application and rendering results on a page through a web part. It's currently outdated and we'd be interested in reworking how this particular data is being used on the site.

What we would like to do now is to take that data and have each entry in the table populate pages as editable content outside of using custom tables to store the data. Changes in the company have made it a bit outdated and we'd like the increased flexibility of having a page type we can build more/different features around.

Is there a known way to export the custom table data to populate the Form fields of a custom page template, creating unique pages based around each entry in the table?

Correct Answer

Mike Wills answered on June 4, 2019 23:58

Hi Michael,

Another option, if you'd like to create a bunch of pages, is to use the Kentico Import Toolkit. In migration scenarios, I've used it to map fields from a source table to fields of a Page Type. It generated the pages and populated the mapped fields of those pages.


1 votesVote for this answer Unmark Correct answer

Recent Answers

Peter Mogilnitski answered on June 4, 2019 23:27 (last edited on June 5, 2019 02:53)

Why not to use macro? GlobalObjects.CustomTables["customtable.sampletable"].Items Or To get a particular item you can do .Items.Where("ItemID=1")[0]["fieldname"]

I find way more efficient to have one page to render data from custom table based on item Id or some other unique field, especially for a big custom table. especially because after the first request everything is cached, next request will none or one query to custom table. way more efficient then traditional page structures.

If you want to create a bunch of pages and prefilled them with data - you will have to write a custom import script using API.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 5, 2019 15:31

I'd second Mike's approach and using the KIT to get the job done. If your content is structured, then I'd recommend AGAINST using editable text webparts on your pages. Structure your page types so you have specific fields for your data and not just a generic catch-all editable text webpart.

Kentico is based on page types and the system is optimized for this specifically. Using custom tables to display your data isn't a fast solution and usually ends up in trouble later.

1 votesVote for this answer Mark as a Correct answer

Michael Purgar answered on June 5, 2019 15:40

Mike - Thank you! This sounds like what I need. I'll spend some time with the Import Toolkit to get things set up.

Peter - We currently have data in a custom table like you describe but we're running into some limitations in what we can do with how we display it on the site and in search among other things, so bringing the data into pages more of our current editors can easily manage provides us with advantages.

Brendan - This is our plan for the important data being brought over from the custom table, using specific page fields to keep the precise data into needed formats, but then introducing other elements into the page for editors on top of that.

Thanks to everyone for the help!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.