Kentico ASCX转换页面类型属性 [英] Kentico ASCX transformation page type properties
问题描述
我正在计划一个完整的动态手风琴.想法是将文件上载到一系列文件夹中.现在,我可以在页面上放置一堆转发器,每个文件夹一个,然后进行一次转换,以读取文件并生成链接和手风琴的HTML.我希望做的是进行一次转换,该转换将读取所有文件夹及其子项.
I'm starting to plan out an full dynamic accordion. The idea is files would be upload to a series of folders. Now i could place a bunch of repeaters on a page, one per folder and have a transformation that reads the files and generates links and the HTML for the accordion. What I'm hoping to do is have one transformation what will read all the folders, and their children.
所以初始逻辑是这样的.
So initial logic is something like this.
if (PageType = cms.Folder && HasChildren = true){
Output folder name + html
Output children + html
}
示例内容树:
父节点
- 文件夹1
- Folder 1
我可以控制子页面类型cms.file,而父页面将是cms.folder,但是如何检测确定实际的页面类型以及是否有子页面?
I can control the children page types, cms.file, and the parents will be cms.folder, but how do i detect determine the actual page type and if there are children?
推荐答案
Mark, consider using hierarchical transformation/viewer - it should handle this.
这篇关于Kentico ASCX转换页面类型属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!