I followed the tutorial here: docs.sitefinity.com/feather-create-widgets
I created a widget in it's own project. Then to the view, I added a button to call a js function. However, when referencing the .js file, sitefinity is unable to find it. See view code below:
@*This script tag does not work*@
@*This line does not work either*@
It seems as though sitefinity is looking for these scripts in
Rather than looking in
Am I referencing this script incorrectly?
@Html.Script(Url.EmbeddedResource("FullTypeNameOfAClassInTheProject", "MyFirstMvcWidget.Mvc.Scripts.MessageWidget.MessageWidget.js"), "bottom")
For CSS I used the following syntax in my AssemblyInfo.cs
, PerformSubstitution =
I forgot exactly where this is documented, but it works.
Case, expained above by Velizar, is for resource files, located in another assembly. For example you created separate .dll for your widgets with embedded resources. And you can use some resources (js or css) from this .dll inside another dll. You can do it in this way:
If you want to use your resources located in your assembly, you can follow this article http://docs.sitefinity.com/feather-refer-to-resources-inside-views and use something like that:
Can someone please explain this better.
I'm confused because if you look at the feather samples they are no referenced in this way. They are referenced using this style?
Also why does this document page not reflect whats being said here.
Thanks. Sorry to me it didn't seem obvious if you were meaning using the script within your own assembly or from a another. Then looking at the feather sample they were referenced using the bottom method.