Documentation > CMS Template API Library > Input > ShowWcoControls(String)
ShowWcoControls
Adds Wco controls that will bind a field on the asset with a WCO Snippet. Should be paired with an editable text fields of the same name, like a TextBox or Wysiwyg
public System.Void ShowWcoControls(String)
Parameters
| Name | Description | Type |
|---|---|---|
| fieldName | The name of the field that will be bound to the Wco snippet | System.String |
Code Example
C#
Sample:
// This will provide a control that will allow you to bind a WCO snippet to a text field called "fieldTextBox"
Input.ShowWcoControls("fieldTextBox");
Input.ShowTextBox("Field", "fieldTextBox");
// This will provide a control that will allow you to bind a WCO snippet to a wysiwyg field called "fieldWyswiwyg"
Input.ShowWcoControls("fieldWyswiwyg");
WysiwygParams wParams = new WysiwygParams();
wParams.Stylesheet = "/Assets/css/stylesheet.css";
wParams.HtmlPasteOptions = Util.MakeList("cleanOption", "mergeInlineStylesOption", "plainTextOption");
wParams.ImageFolder = "/";
wParams.ImageUpload = RelationshipType.Attach;
wParams.ImageBrowse = RelationshipType.Link;
wParams.LinkFolder = "/";
wParams.LinkUpload = RelationshipType.Attach;
wParams.LinkBrowse = RelationshipType.Link;
wParams.DesignEditTabs = true;
Input.ShowWysiwyg("Field", "fieldWyswiwyg", wParams, "", 500, 450);