htl

    0熱度

    1回答

    我有一個需要共享的頁腳元素。我的計劃是在父/主頁上設置頁腳,但允許子頁面覆蓋這些屬性。 我首先查看當前組件的屬性(非常標準),然後獲取父頁面的路徑以查找組件上具有相同名稱的屬性。 function getProperty(property, currentPage) { var val = null, page = currentPage, rootPage =

    1熱度

    1回答

    我正在嘗試預解釋資產,如解釋here。 我在/apps/foundation/components/page/head.html包括這些: <sly data-sly-use.appConfig="${'../../../utils/AppConfig.js'}"> <link rel="preload" href="${appConfig.assetsURL}/etc/designs/

    -1熱度

    2回答

    我在我的AEM項目(AEM版本6.3)中使用Sightly/HTL作爲模板語言。由於Sightly提供了大量的上下文對象,其中兩個是:通過org.apache.sling.api.SlingHttpServletRequest支持的請求和由javax.servlet.http.HttpSession支持的currentSession,我試圖在我的視野中訪問一些會話參數值通過執行類似如下文件: ${

    0熱度

    2回答

    是什麼區別: <div data-sly-test.backgroundVideo="${hero.backgroundVideo}" > Background video URL: <a href="${backgroundVideo}.html" target="_blank"> ${backgroundVideo} </a> </div>

    1熱度

    3回答

    我正在使用AEM 6.1 SP2,我試圖在定位標記的href中啓用'tel'屬性以使點擊調用功能性工作。我已經添加了'htmlRules'節點 ,並將htmlRules節點下的節點與'protocols'屬性鏈接爲[http://,https://,ftp://,tel :, mailto :, file://] 在鏈接中指定 - http://labs.6dglobal.com/blog/201

    0熱度

    1回答

    根據條件進行視覺模板渲染嗎? 例如 component.html渲染基於參數 如果一個參數存在 <div data-sly-use.myComponent="${'com.myproject.service' @ param1='one''}"> ${myComponent.calculatedValue} </div> 如果參數存在兩個 <div data-sly-use.myC

    0熱度

    1回答

    我有一些組件已被分解爲多個較小的文件。主文件包括它們使用data-sly-include屬性。 我想在主文件和包含文件中生成包含當前文件名的HTML註釋,這樣當我查看呈現的輸出時,我可以輕鬆地分辨出哪個文件生成了輸出。例如: ... some HTML from the template or other components... <!-- begin /path/to/main/file.h

    0熱度

    1回答

    中看到編輯選項 以下是我在HTL文件footer.html中編寫的代碼我在此處使用可編輯模板。 <div class="6u"> <div class="row collapse-at-2"> <sly data-sly-test="${footer.arr}"> <sly data-sly-repeat="${footer.ar

    0熱度

    2回答

    我試圖使用OSGi R6註釋來創建OSGi服務,然後注入其在吊帶Model類是這樣的: package com.aem.sites.models; import javax.annotation.PostConstruct; import javax.inject.Inject; import org.apache.sling.api.resource.Resource; import

    0熱度

    2回答

    我正在使用非常基本的Sling Model類,它根本不起作用。這是類: package com.aem.sites.models.test; import org.apache.sling.models.annotations.Model; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.ann