Automatically setting ControlTemplates for custom themes

Posted by Community Admin on 03-Aug-2018 08:08

Automatically setting ControlTemplates for custom themes

All Replies

Posted by Community Admin on 22-Sep-2010 00:00

Is there a way for controls I drag from the page and template editor onto a page or template to automatically pick up templates from the ControlTemplates directory in my custom theme?


If not, is there a faster way of setting the TemplatePath property for a given control on a page? I currently set it by going to the Advanced Properties Browser in the Edit Dialog and going through ControlDefinition -> (Template) -> TemplatePath.

Also, I'm using a copy of DefaultTemplate and haven't renamed files, so they should match the default template.

Posted by Community Admin on 22-Sep-2010 00:00

Hello Klemen,

Controls that inherit from SimpleView has a public property LayoutTemplatePath which is used for setting the template of a control. You can set this property through your control designer, set the default template from Administration >> Settings >> Toolboxes >> [[your control]] or implement ( override existing)a control which inherits from SimpleView and return the path to your custom template.

Greetings,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Sep-2010 00:00

I can't seem to find the setting in the administration, but I've found:


Administration -> Settings -> Controls -> ViewMap

... which has the LayoutTemplatePath property. Is this the same thing?

Posted by Community Admin on 22-Sep-2010 00:00

Hi Klemen,

I attached a screenshot that shows the location of ToolBox section where all controls you have should be added.

Sincerely yours,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Sep-2010 00:00

Ah, for some reason I missed the Toolbox section.


Thanks.

Posted by Community Admin on 22-Sep-2010 00:00

I've gone through all the sections in Toolboxes -> PageControls->Sections -> ContentToolboxSection, but I can't find the NewsView, BlogView and EventsView controls that I'm using in my templates. Do I need to extend these classes and use those to set the layout template path or am I missing something?

Posted by Community Admin on 22-Sep-2010 00:00

Hello Klemen,

For these controls , you can use LayoutTempaltePath property. These controls are not added to the Settings configuration, because they are initialized together with a module ( News, Blogs, Events) initialization and added to the memory. We have logged a task to find a way to add all controls in Toolboxes -> PageControls->Sections. This is just a limitation in the BETA.

Sincerely yours,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Sep-2010 00:00

Sounds great, this will be a real time saver in the final product.

This thread is closed