Hiding Components
Hiding Content
collective.autopublishing vs ftw.protectinactive
collective.autopublishing Plone5 compatible
Hiding Personal Preference Tab
- Portal Actions Visible Option
- Diazo Rule
<drop css:content="#contentview-user_data-personal-preferences" />
Hiding Archetypes Field
以 Publishing Date 和 Expiration Date 為例,自製表單的場合未必需要它們,可以參考 Products/Archetypes/ExtensibleMetadata.py 的原始設定值,在 mytype.py 裡指定編輯時不顯示 expirationDate 欄位,也就是 'edit': 'invisible' 屬性值。
atapi.DateTimeField(
'expirationDate',
mutator='setExpirationDate',
languageIndependent = True,
widget=atapi.CalendarWidget(
label=_(u'label_expiration_date', u'Expiration Date'),
description=_(u'help_expiration_date',
default=u"The date when the item expires. This will automatically "
"make the item invisible for others at the given date. "
"If no date is chosen, it will never expire."),
visible={'edit': 'invisible', 'view': 'invisible'},
),
),
Hiding the Editable-Object Border
在 MyTypeView 的 class 定義裡指定:
self.request.set('disable_border', True)
showEditableBorder is deprecated
403 Forbidden Error
遇到需要權限的網頁,直接顯示「權限不足」的畫面。
http://stackoverflow.com/questions/8791132/how-to-create-sticky-news-items-in-plone-4
http://stackoverflow.com/questions/22619215/tal-condition-in-plone-to-hide-html-if-its-a-document-page