When I add this snippet manifest JumbotronSnippet.txt for my JumbotronSnippet.cshtml
DisplayName: Jumbotron
ToolboxIcon: \uf10c
Description: A configurable jumbotron
Category: Bootstrap
Fields:
- Name: Caption
DisplayName: Caption
Description: The caption to display
Type: Text
- Name: Body
DisplayName: Body
Description: The body text to display
Type: Text
Orchard Layout Part does not appear in dashboard.
My JumbotronSnippet.cshtml has this code:
<div class="jumbotron">
<h2>@Model.Caption</h2>
@Html.Raw(Model.Body)
</div>
Am I doing something wrong?
Have you enabled the Layouts Snippets feature in the Modules menu?
It's caught me out a few times because there is a Snippets category for the Shape element but that doesn't mean that Snippets is enabled.
Which version of Orchard are you running? Sipke implemented the first version of the manifest file in 1.10.1 release (current).
I came along and added code to support all the extra fields that you are using but it looks like they haven't graduated to a released version yet, they are in the 1.10.x and dev branches though.
If you're already running 1.10.1 and want these features then you can just drop this file into your project - the only changes made to it are all contained in that file and they will just expand the number of fields supported in the manifest file parser.
Here is an example one that I'm using in a client project
DisplayName: Facebook Panel
ToolboxIcon: \uf230
Category: Social
Description: Configurable element to display a link to a Facebook page
Fields:
- Name: SocialUrl
Type: Text
DisplayName: Facebook URL
Description: The URL to your Facebook page.
Straight off I am seeing its space space dash space but you have more indentation. I don't recall if the exact number of spaces will break things but the indentation is important.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With