Reusable display components aspx templates

Tom F asked on November 29, 2016 06:50

Hi I'm new to Kentico coming from Umbraco land. I was wondering if you wanted to create a reusable component with say

Image, Title text, content text as something a user could add to a section as many times as they wish, would a web part in the form of a user control be the usual "Kentico way" of doing things?

Sorry I'm new to how people generally use kentico structurally..

Thanks, Tom

Recent Answers


Adam Gitin answered on November 29, 2016 08:52

Hi Tom,

This reusable content type of "Image, Title text, content text" would be a Kentico "page type" the would be created by adain in the site tree.

Then you would use a web part to display this data. One of the repeater webaprts.

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on November 29, 2016 09:31

Yes, correct, or maybe you are looking for something like this http://devnet.kentico.com/articles/content-blocks

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 29, 2016 15:42 (last edited on April 24, 2017 15:30)

I agree with Adam, use a custom page type and store those pages/content blocks in a folder in the content tree. I've used Content Blocks before and they work well, clients seem to like to stay in one place and do their editing though, especially if there is only one site utilizing the content.

0 votesVote for this answer Mark as a Correct answer

Justin L answered on April 24, 2017 15:28

Hello kentico guru's,

I've been looking for a way to accomplish this in Kentico, as i am working on a website where the client wants to be able to adjust his webpage with the use of pre-made blocks (arrange order, add or remove blocks) and also be able to edit the text inside those blocks.

I believe i've found another thread where somebody was trying the same: https://devnet.kentico.com/questions/web-part-properties-widget

Is the 'Content blocks' package mentioned earlier in this thread still useable in Kentico 10? Or are there other/new/better ways to accomplish this?

Best regards, Justin

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 24, 2017 15:33

I'd take a look at this article by Joel, pretty good info regarding page types and how to use them as content blocks http://dahlindevelopment.com/blog/july-2016/tips-for-creating-page-types-in-kentico/

1 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on April 24, 2017 15:35

1 votesVote for this answer Mark as a Correct answer

Justin L answered on April 25, 2017 12:02 (last edited on April 28, 2017 15:28)

Thank you both, i've almost created what i want using Brenden's link and the Kentico 10 documentation. As i now have a Page type that i use as a 'block', which contains fields for an editor to use.

But now i have two more questions. In the documentation example for displaying Page types a 'Datalist' webpart is used to output the Page type, although this also works for me, it also adds a html-table around my 'block'. How can i display my Page types without extra mark-up being added?

My other question is related to Brendan's link, as the example describes using a Page type as an 'container' for his carousel, which can house other Page types which would function as slides. How can i create a container Page type that outputs other page types? (in his case, the slides)

0 votesVote for this answer Mark as a Correct answer

Justin L answered on April 28, 2017 15:29 (last edited on April 28, 2017 15:29)

Because there was no response, i've created a new question about this with some more info/explanation: https://devnet.kentico.com/questions/manageable-content-blocks

0 votesVote for this answer Mark as a Correct answer

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