2016-07-22 73 views

回答

2

只是爲了增加一些澄清什麼是已經在這裏:

全局內容(即在多個實例中通用的組件值相同的模板)存儲爲「樣式」並通過「設計對話框」進行編輯。

它們存儲如下:

/etc/designs/<design>/jcr:content/<template>/<component> 

所以,在模板homepage組件logo,使用default設計:

  • currentStyle/etc/designs/default/jcr:content/homepage/logo
  • currentDesign/etc/designs/default
2

currentStyle類型爲com.day.cq.wcm.api.designer.Style(1)而currentDesigncom.day.cq.wcm.api.designer.Design(2)的實例。

Design對象包含有關與當前對象一起使用的設計的信息,它大部分是在頁面模板的cq:designPath屬性中設置的。

如果您有Design對象,則可以從中爲每個包含的Cell(3)獲得Style對象。另一方面,如果您有Style,則可以獲得周圍的Design

因此,Design就像是包含的Cell中使用的Style的容器對象。

在此路徑

/etc/designs/geometrixx/jcr:content/page/image 

imageCell,設計路徑是/etc/designs/geometrixx和連接到Cell對象Style對象具有兩個屬性:maxHeightmaxWidth

see screenshot

(1):https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/index.html?com/day/cq/wcm/api/designer/Design.html

(2):https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/index.html?com/day/cq/wcm/api/designer/Style.html

(3):https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/index.html?com/day/cq/wcm/api/designer/Cell.html

相關問題