Reputation: 5670
I create a new Razor scripting file. just a test string in there (no actual razor code), then put the macro in a template and it displays:
Error loading MacroEngine script (file: test.razor)
Upvotes: 0
Views: 1708
Reputation: 56566
Usually, the macro scripts have the extension .cshtml
(not .razor
) and are placed in the /macroScripts
folder.
The macros usually look like this:
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
// razor & html
<div>A simple div</div>
}
You may try by simply putting a @{ ... }
around your test string (as well as renaming the extension to cshtml).
Upvotes: 3