为页面模板中的模板变量提供方法pt_filled_slots,以查看正在填充哪些slots
Products.PageTemplateFilledSlots的Python项目详细描述
此产品将pt_filled_slots方法添加到页面模板,因此 可以在填充的插槽内或之前查看哪些插槽 由调用页模板填充。
例如,template.pt_filled_slots中的“python:”content-core“可以 调用以查看是否定义了内容核心。
在发现这种方法的一些安全相关问题之后 (拒绝访问)我还添加了将方法设置为 外部方法:
ID: pt_filled_slots Module name: Products.PageTemplateFilledSlots.pt_filled_slots Function name: pt_filled_slots
这叫做via,例如“python:content-core” 页面模板中的context.pt_filled_slots(template)”。
1.0.1(2012-03-27)
- Added patching of ac_permissions for template, as well as an alternative method of applying pt_filled_slots from an External Method.
1.0(2012-03-21)
- Initial release