我正在尝试在Sitecore富文本编辑器中使用自定义样式.我找到了文章,它描述了如何做,但我必须将我的样式放在default.css文件中.我想在分离的.css文件中添加我的自定义样式以避免潜在的问题(例如,在升级版本时覆盖默认的.css文件等).有没有办法一次使用default.css和custom.css文件?
在我的Sitecore项目中,我使用DateTime(Sitecore的类型)字段作为一个Item.我试图通过以下代码获得此值:
var dateField = (DateField)item.Fields["Date"];
var itemDate = dateField.DateTime;
Run Code Online (Sandbox Code Playgroud)
但itemDate包含错误的日期.我们来检查dateField.Value:它包含格式正确的日期:yyyymmddThhmmss.您可以在以下屏幕截图中看到:
你可以看到DateTime的日期是9月13日,但是Value日期是9月14日.
这个问题有什么原因?如何从得到正确的数据DateField作为DateTime?
我使用SSH.NET(2013.4.7版)库将文件上传到SFTP服务器.这是我的代码片段:
using (var client = new SftpClient(host, port, username, password))
{
client.Connect();
...
}
Run Code Online (Sandbox Code Playgroud)
我在Connect()方法执行时收到以下错误消息: "System.InvalidOperationException:Server string为null或为空."
我在这里找到了关于这个问题的小建议:http://www.ipbalance.com/programming/ms-powershell/1098-powershell-how-to-use-sshnet-library-for-cisco-on-windows-7. html 使用'xxxx'主机格式而不是xxxx,但它对我没有帮助.
价值host变量为"153.112.49.198".port当我使用FileZilla工具使用相同的主机,端口,用户名和密码时,它工作正常.
堆栈跟踪:
System.InvalidOperationException: Server string is null or empty.
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()
at [here is my method]
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激.
我需要修补 Sitecore 的管道以禁用其中一个处理器。我可以这样做,还是应该删除并实施整个管道?