小编al3*_*ull的帖子

transitionToRoute('route')来自内部组件

如何从组件操作内部实际转换到路径?

我尝试使用@get('controller').transitionToRoute('images'),但控制器引用组件本身.我知道组件应该是自包含的,所以我应该使用视图来改善与控制器/路由的交互吗?

App.ImageEditorComponent = Ember.Component.extend
  ...
  actions:
    delete: ->
      App.Files.removeObject(object)
      @transitionToRoute('images') # This throws an exception
  ...
Run Code Online (Sandbox Code Playgroud)

ember.js

17
推荐指数
2
解决办法
1万
查看次数

如何关闭Sitecore中的XHTML验证?

如何在工作流程中关闭Sitecore(6.5)XHTML页面验证?

我正在开发并在尝试发布测试页时继续遇到问题,因为它们出错了.我更愿意在浏览器中将错误视为堆栈跟踪.

我不确定在此之前我是否已经改变了一些东西,但我最近采取了将Sitecore转移到多站点解决方案的项目.

我在第一次开发解决方案时没有遇到这些问题,但我使用的是6.4而不是6.5.

sitecore sitecore6

8
推荐指数
2
解决办法
5099
查看次数

Sitecore Axes.IsDescendantOf/Axes.IsAncestorOf - Inclusive?

有没有办法,我很想念有Sitecore的退货原因或什么true的都Item.Axes.IsDescendantOf()Item.Axes.IsAncestorOf()

var test =
Sitecore.Context.Database.GetItem("{862B466A-079B-40E7-8661-FC064EC28574}");  
Response.Write(test.Axes.IsAncestorOf(test));  
Response.Write(test.Axes.IsDes(test));
Run Code Online (Sandbox Code Playgroud)

// True
// True

编辑:任何可能偶然发现这个答案寻找非包容性的人,IsAncestorOf或者IsDescendantOf下面是一些例子,我需要在新选类别的多选字段中找到最高级别的元素.

newsCategories
   .Where(x => newsCategories
                       .Any(y => x != y && !x.Axes.IsDescendantOf(y)))
Run Code Online (Sandbox Code Playgroud)

newsCategories
   .Where(x => newsCategories
                       .Any(y => x != y && !x.Axes.IsDescendantOf(y)))
Run Code Online (Sandbox Code Playgroud)

items sitecore sitecore6

4
推荐指数
1
解决办法
1314
查看次数

Sitecore 500错误记录/警报

问题

目前,我正在寻找一个自定义500错误页面,以及记录和提醒网站管理员有关被击中的情况(什么URL,堆栈跟踪,时间戳等).

我尝试在系统配置下定义自定义http错误,但没有命中错误页面.我能够处理404s及其相关错误(layoutnotfound).

我应该拦截global.asax中的上下文来处理500个错误并返回自定义页面吗?Sitecore是否有另一种方式来实现我正在寻找的东西?

主要是,我正在寻找使用Sitecore记录/警告500个错误的最佳做法

c# logging sitecore

3
推荐指数
2
解决办法
2365
查看次数

找不到child_model(NameError)

我无法确定为什么我在这里收到名称错误.我是DataMapper的新手,但尝试关联.任何帮助表示赞赏.

用户:

class User
  include DataMapper::Resource

  property :id,            Serial, :key => true
  property :first_name,    String
  property :last_name,     String
  property :company,       String
  property :city,          String
  property :country,       String
  property :mobile_number, Integer
  property :email_address, String
  property :shahash,       String
  property :isRegistered,  Boolean

  belongs_to :event, :required => true
end

DataMapper.auto_upgrade!
Run Code Online (Sandbox Code Playgroud)

事件:

class Event
  include DataMapper::Resource

  property :id,          Serial, :key => true
  property :name,        String
  property :occuring,    DateTime

  has n, :user
end

DataMapper.auto_upgrade!
Run Code Online (Sandbox Code Playgroud)

ruby datamapper sinatra

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

标签 统计

sitecore ×3

sitecore6 ×2

c# ×1

datamapper ×1

ember.js ×1

items ×1

logging ×1

ruby ×1

sinatra ×1