是否可以在Composite C1中扩展Image类型以获取摄影师和其他内容的字段?
(如果没有,我可能会在描述字段中找到json。)
答案 0 :(得分:0)
你能解释一下你的问题吗?我想按照我的理解回答。
因此,在我看来,您正在尝试使用有关图像的输入字段来获取用户值?如果是,那么答案是肯定的,您可以通过剃刀或CMS提供的任何功能,并且您需要定义如下参数:
public DataReference<IMediaFile> ImageSource { get; set; }
public string altText { get; set; }
public string Title { get; set; }
[FunctionParameter(Label = "Short Description",
Help = "A short description ...",
DefaultValue = "(write your description here)",
WidgetMarkup = "<f:widgetfunction name='Composite.Widgets.String.TextArea' xmlns:f='http://www.composite.net/ns/function/1.0'><f:param name='SpellCheck' value='true' /></f:widgetfunction>")]
public string Description { get; set; }
因此,如上例中使用[FunctionParameter()]所示,您也可以为其余输入参数设置标签等。因此,这将获得用户所需的信息,然后在剃刀的帮助下,您可以创建<img>
元素。如果我们和您的问题在同一页面上,请告诉我,然后我想我可以提供更多有关答案的信息。
希望这会有所帮助。 感谢您阅读本文。