Linked snippet components that show an element's details are the details type. They contain only a little HTML to lay out the details: for example an <h1> for the page title (such as a topic's title), then an <h2> for a short description or note (such as a product's short description). The full description has no HTML of its own beyond a paragraph tag and the code that outputs HTML to the page.That's because every description on Emole uses the full HTML editor, so the merchant designs the description. See What is the HTML editor?This is called raw output: Html.Raw wraps HTML markup so it's rendered as HTML.Text output is normally HTML-encoded. Html.Raw outputs text that contains HTML elements so that the browser renders them as HTML.
takes two parameters: the component name, and the component's properties. Details-type components require the second parameter, to say which data to show.The second parameter starts with new followed by the property names, as above.You can pass several properties, separated by commas:If you don't pass a parameter, the snippet shows nothing: details components show a single element, so you must specify at least one property.If the value doesn't belong to the current store, the snippet also shows nothing: each component only shows the current store's data.
Some components need just one property; others need the component's model.
A model is a class object with many properties.
In Emole every details component has its own model class, which holds all of the data the view shows: