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>