Extending the Facebook Like button sample
As an exercise, I decided to try altering Ivan's sample into a small module so that it could support localization. It's worked well so far, but I have two questions:
1. How do I get a custom icon to appear in the toolbar? Is the only way to edit the project itself rather than doing something in the module?
2. It never seems to hit the Install method on the module when it's added through the site administration. When/how is the Install method triggered?
Source
Hello Michael,
first of all, I'd like to apologize for the late answer.
Here is the answer to your questions:
1. How do I get a custom icon to appear in the toolbar? Is the only way to edit the project itself rather than doing something in the module?
Admittedly, we do not have a easy way to do this. I've added this to our backlog to be fixed very soon after Q1 is released. In the mean time, this is how you can do it.
The icons on the widgets are really pulled from CSS. Each widget in the toolbox can have a specific CSS class, like we have it for example for the Blog Posts widget:
var tool =
new
ToolboxItem(section.Tools)
Name =
"BlogPostsView"
,
Title =
"BlogPostsViewTitle"
,
Description =
"BlogPostsViewDescription"
,
ModuleName = BlogsModule.ModuleName,
CssClass =
"sfBlogsViewIcn"
,
ResourceClassId = classId,
ControlType =
typeof
(BlogPostView).AssemblyQualifiedName
;