标签: sitecore-speak-ui

Sitecore SPEAK初学者在使用Javascript时遇到问题

我正在尝试编写我的第一个简单的Sitecore Speak组件.

没什么好看的,我只需要开始.所以我在Visual Studio中创建了我的Speak组件,在Sitecore中,我的渲染指向了我的组件.这一切都是开箱即用的.我在我的SPEAK布局上插入我的渲染,当我访问该页面时,我收到一个错误说明这一点 在此输入图像描述

任何人都知道为什么?我需要做什么?我正在使用Sitecore 7.5.

我的cshtml看起来像这样:

@using Sitecore.Mvc
@using Sitecore.Mvc.Presentation
@using Sitecore.Web.UI.Controls.Common.UserControls
@model RenderingModel
@{
  var rendering = Html.Sitecore().Controls().GetUserControl(Model.Rendering);
  rendering.Class = "sc-Test2";
  rendering.Requires.Script("client", "Test2.js");

  var htmlAttributes = rendering.HtmlAttributes;
}      
<div @htmlAttributes>

</div>
Run Code Online (Sandbox Code Playgroud)

sitecore sitecore7 sitecore-speak-ui

3
推荐指数
1
解决办法
998
查看次数

标签 统计

sitecore ×1

sitecore-speak-ui ×1

sitecore7 ×1