【问题标题】:Touch UI v/s Classic UI in AEMAEM 中的触控 UI 与经典 UI
【发布时间】:2015-10-29 09:02:54
【问题描述】:

我们如何检查Adobe Experience Manager/CQ5中的html页面是以触摸模式还是经典模式打开的?

【问题讨论】:

  • 你想在 Sightly 中检查这个?
  • 一目了然。或任何其他方法。

标签: aem


【解决方案1】:

你可以给/libs/wcm/foundation/components/utils/AuthoringUtils.js添加依赖,然后调用AuthoringUtils.isTouchAuthoringUtils.isClassic查看当前是接触还是经典模式。例如,您的 JS Use API 如下所示。

"use strict";

use(["/libs/wcm/foundation/components/utils/AuthoringUtils.js"], function (AuthoringUtils) {
    if (AuthoringUtils.isTouch) {
        // do something
    } else {
        // do something else
    }

    // rest of the things
}

【讨论】:

  • 如果有帮助,请考虑接受答案
猜你喜欢
  • 1970-01-01
  • 2016-01-25
  • 1970-01-01
  • 1970-01-01
  • 2023-04-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多