Widget Template no longer displayed in UI after change
Hi,
I am trying to implement the functionality blogged in http://www.sitefinity.com/blogs/slavo-ingilizovs-blog/2012/09/21/making-your-widget-templates-editable-through-the-ui and I have been able to get my Widget Template displayed in the UI as expected.
The weird thing is that it is no longer displayed after i change something in the UI and save the changes. I can see that the template is still stored in the appropriate SQL table but the UI no longer displays it. When you take a look at a page using the Widget I can see that the template in the database is applied (and not the default one from the dll).
Does anyone have an idea what my be causing this?
Regards,
David
p.s. I am having this issue at a SF 5.4.4020 system. I have attached the cs file used to created the Widget Template in the database. Take a look at the InstallWidgetTemplatesInDatabase method.
Hi David,
I just solved this issue a moment ago, so what I did was:
So you can annotate it like this:
[ControlTemplateInfo(
"ResourceClassName"
,
"ControlTitleResource"
,
"AreaNameResource"
)]
initializer.RegisterControlTemplate(
"ControlsLayoutTemplateName"
,
typeof
(YourControl).FullName,
"ControlTitleResourceValue"
,
areaName:
"AreaNameResourceValue"
,
resourceAssemblyName:
"assemblyNameOfTheResourceClass"
);
Thanks, Daniel,
That helped me solve my problem.
Regards,
David