Yeah such situations are embarrassing... Never mind my previous post, I managed to get it working. I still dont know how to use the relative path for my icon though. I mean, I dont know where I should place the icon... when I use the "/_layouts/images/ribbon_blog_32.png" form, I can't figure out where the _layouts path is. Or, if I'm supposed to create it, where am I supposed to create it. Oh well, I guess I'll figure that out as well, at some point.
The following code works like a charm anyways:
Code:
<?xml version=â1.0″ encoding=âutf-8″?><Elements xmlns=âhttp://schemas.microsoft.com/sharepoint/â>
<CustomAction
Id=âTest_Buttonâ
Location=âCommandUI.Ribbonâ>
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location=âRibbon.Documents.New.Controls._childrenâ>
<Button Id=âRibbon.Documents.New.RibbonTestâ
Alt=âTest Buttonâ
Sequence=â8″
Command=âTest_Buttonâ
LabelText=âClick me!â
Image32by32=âC:\Users\User\Desktop\icon.jpgâ
TemplateAlias=âo1″ />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command=âTest_Buttonâ
CommandAction=âjavascript:alert(âI am a test!â);â />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>