Question

We're trying to create an extended version of the built in Sitefinity ImageControl by creating a separate toolbox.config entry with a custom LayoutTemplate specified.

This essentially works, however when dragging the control from the toolbox in the editor it does not have the custom LayoutTemplate we specified in the config, it uses the default ImageControl LayoutTemplate.

If we manually change the value in the advanced settings of the widget to our new template, it all works. However, obviously in terms of usability this is quite useless.

Is it a bug that the widget doesn't pick up out LayoutTemplate in the toolbox.config, or is there something else we need to do in order for it to be picked up automatically?

Thanks in advance for your help!

Was it helpful?

Solution

It sounds like a bug to me, you should raise a bug report through the ticketing system.

In the meantime have you tried using Option 2 of this blog posted by Josh Morales:

Mapping External Templates for Sitefinity Widgets

It is written for version 4, but should still work in 5.

OTHER TIPS

I'm still investigating the matter, but in addition to Seans suggestion, you could alternatively you inherit from the image control, hard-code the layout template path by overriding the property value to point to your template, then add that control to the toolbox with a different name.

This is a bit of an extreme workaround, since if this is a bug and gets resolved in the next release you'll have to go back and replace them all again to use the toolbox property...

but it's an option! I'll get back when I know more about why this isn't working the way you expect...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top