Rendering Parameters

Similar to modelling templates you are able to model rendering parameter templates. While the rendering parameter templates in Sitecore are effectively the same as your standard templates the way the data is stored is different. Due to the fact rendering parameters aren’t actually items and the values are stored in the presentation details you will need to use different base classes and interfaces. Generally it is best to stick with simple field types when using rendering parameters and therefore Fortis comes with a reduced number of field types that can be modelled compared to the standard templates.

Mongaguá does the drug actos cause weight gain Key points

Let’s assume we have the following rendering parameter template in Sitecore;

  • Container Options
    • Border – Checkbox
    • Border Colour – Droplink
    • Border Thickness – Integer
    • Border CSS – Single-Line Text
[TemplateMapping("{AAA421D9-53C1-443B-AB8C-0499110138D8}", "InterfaceRenderingParameter")]
public partial interface IContainerOptions : IRenderingParameterWrapper
{
	IBooleanFieldWrapper Border { get; }
 	ILinkFieldWrapper BorderColour { get; }
 	IIntegerFieldWrapper BorderThickness { get; }
 	ITextFieldWrapper BorderCss { get; }
}

[TemplateMapping("{AAA421D9-53C1-443B-AB8C-0499110138D8}", "RenderingParameter")]
public partial class ContainerOptions : RenderingParameterWrapper
{
	public ContainerOptions(Dictionary<string, string> parameters, ISpawnProvider spawnProvider) : base(parameters, spawnProvider)
	{
	}

	public virtual IBooleanFieldWrapper Border
	{
		get { return (Fortis.Model.RenderingParameters.Fields.BooleanFieldWrapper)GetField("Border", "checkbox"); }
	}

	public virtual ILinkFieldWrapper BorderColour
	{
		get { return (Fortis.Model.RenderingParameters.Fields.LinkFieldWrapper)GetField("Border Colour", "droplink"); }
	}

	public virtual IIntegerFieldWrapper BorderThickness
	{
		get { return (Fortis.Model.RenderingParameters.Fields.IntegerFieldWrapper)GetField("Border Thickness", "integer"); }
	}

	public virtual ITextFieldWrapper BorderCss
	{
		get { return (Fortis.Model.RenderingParameters.Fields.TextFieldWrapper)GetField("Border CSS", "single-line text"); }
	}
}

Next: Search