Best Practicies working with Kentico 12/13

Danny Winbourne asked on October 15, 2020 17:43

Hey,

I was wondering what the best practice/how other people handle the following situations:

  1. Wildcard/custom URLS based on position of page in tree view.. i.e. with MVC, if you follow the guidelines, you create custom routes for specific sections in your site, i.e. /articles/{article-name}/ but I want a more flexible approach, in that editors can create a page hiercharchy they want, i.e. /section-1/sub-section-1/page-1/ and the system finds and displays the page (in my case, there would be a single template for all these pages). I've in the past just created a wild card "catch all" route that directs to a single end point, and process against the page alias using the API..

  2. My second question relates to content reuse when using widgets.. Currently, when creating a widget, if you want to enter specific content, you define the properties when creating the widget properties class (based of IWidgetProperties), but content is only connected to the instance of that widget on the page, and can't be used when adding the same widget elsewhere (you might have some sort of "banner" content that you want to display on a few pages, but maintain the content for that in one place). My current approach is to include a "data source" field, and allow editor to pick the content source when adding the widget.. I just wanted if there are better ways of doing this, or if my way should be avoided? Our CMS design is very much a modular approach in that there is an empty template with a place holder, and we create several different "widgets" for the content to be added to a page, giving maximum flexibility to the editor on what widgets / modules they want on page, and in what order.

We are planning a new project that will likely use Kentico 13, and as such hopefully some new features will be included here that might resolve some of these issues/queries.

Thanks, Danny

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