Kentico ASCX transformation page type properties

爷,独闯天下 提交于 2019-12-11 05:28:41

问题


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
}

Example content tree:

parent node

  • Folder 1
    • PDF
    • PDF
    • PDF
  • Folder 2
  • Folder 3
  • Folder 4

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?


回答1:


Mark, consider using hierarchical transformation/viewer - it should handle this.




回答2:


We can use nested repeater in transformation. Something Reference link is https://devnet.kentico.com/forums/f67/t42585/repeater-nested-in-transformation



来源:https://stackoverflow.com/questions/40218365/kentico-ascx-transformation-page-type-properties

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!