您可以為任何版面配置槽位,指定對槽位中所允許元件的特定限制。
如果您限制槽位中的元件,任何使用者只要拖曳不允許的元件,就會看到警告訊息,而無法對該槽位新增或移除元件。
若要設定此限制,您需編輯主題中的版面配置 (例如版面配置檔案 themes\theme_name\layouts\oneslot.htm
),然後將自訂資料屬性新增至槽位 div。
這是自訂屬性的格式。與舊版本主要的差異在於,使用者只能指定元件的 id
。若要在舊版中限制元件,使用者必須使用冗長的 "<type> <id>"
語法 (目前仍支援)。
data-allowed-items='["<id>:","<type>,"<type>:<id>",...]' data-disallowed-items='["<id>":"<type>","<type>:<id>",...]
註:
data-allowed-items
與 data-disallowed-items
的值可以使用雙引號 (") 或單引號 (‘)。在以下範例中,data-allowed-items
使用單引號括住 JSON 陣列,而 data-disallowed-items
則使用雙引號括住 JSON 陣列:
<div id="slot101" class="scs-slot" data-allowed-items='["scs-app","scs-title"]' data-disallowed-items="['File List', 'scs-map']"> </div>
下表列出 Oracle Content Management 隨附的元件及其個別 ID。為了防止發生任何命名衝突,請勿在任何自訂的 (本機或遠端) 元件 ID 前面加上 scs-
,或使用此表格中所列出的任何類型或 ID。
名稱 | 類型 | ID |
---|---|---|
文件管理程式 |
scs-app |
文件管理程式 |
Facebook 按讚 |
scs-app |
Facebook 按讚 |
Facebook 推薦 |
scs-app |
Facebook 推薦 |
檔案清單 |
scs-app |
檔案清單 |
資料夾清單 |
scs-app |
資料夾清單 |
Twitter 跟隨 |
scs-app |
Twitter 跟隨 |
Twitter 分享 |
scs-app |
Twitter 分享 |
按鈕 |
scs-button |
scs-button |
文章 (自訂元件) |
scs-component |
scs-comp-article |
大標題 (自訂元件) |
scs-component |
scs-comp-headline |
影像與文字 (自訂元件) |
scs-component |
scs-comp-image-text |
元件群組 |
scs-componentgroup |
scs-componentgroup |
內容搜尋 | scs-contentsearch | scs-contentsearch |
內容清單 | scs-contentlist | scs-contentlist |
內容預留位置 | scs-component | scs-contentplaceholder |
內容項目 | scs-component | scs-contentitem |
分隔線 |
scs-divider |
scs-divider |
文件 |
scs-document |
scs-document |
圖庫 |
scs-gallery |
scs-gallery |
圖庫格線 |
scs-gallerygrid |
scs-gallerygrid |
影像 |
scs-image |
scs-image |
地圖 |
scs-map |
scs-map |
段落 |
scs-paragraph |
scs-paragraph |
社群列 |
scs-socialbar |
scs-socialbar |
空白間隔 |
scs-spacer |
scs-spacer |
標題 |
scs-title |
scs-title |
YouTube |
scs-youtube |
scs-youtube |
使用者可以建立本機或遠端元件。此範例中提供的名稱 (My_Local_Component
) 是可用來指定要在槽位內限制此元件的 ID。