How to feed a web part with content

Dražen Janjiček asked on February 26, 2016 10:59


From my Sitecore background I'm used to feed content to a presentation component by defining an item (with fields) in Sitecore and configure the data-source of the component to use this particular item. The component then renders certain fields from the data-source item.

How does Kentico handle this? I'm trying to find some documentation but without any luck so far.

Thanks in advance!

Best regards, Drazen

Recent Answers

Trevor Fayas answered on February 26, 2016 14:51 (last edited on February 26, 2016 14:55)

Welcome to the better platform!

Kentico usually handles 'getting' content through Repeaters, either Query Repeaters (which display the content of a custom SQL Query) or other Repeaters (like page, etc).

In both cases, a repeater gets a data source (SQL query, xml, etc), and 'loops through' each row of the data source, displaying it however you like (via transformations).

In Kentico there are also many "Data Source" Web parts that allow you to define the data source separately and then attach other web parts to it (like repeaters of course).

If you are trying to, programatically in the background, insert content or configure a web part, that also can be done, however kentico is NOT like sitecore, it's better. Sitecore's mentality is everything in code, Kentico's is everything in portal (web interface), and only do Code when you need it.

I would read the article on Kentico's best practices in the Devnet, it will give you a great idea of how Kentico has built out the platform and how easy it is if you do it the right way!

Shoot me an email if you get lost.

0 votesVote for this answer Mark as a Correct answer

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