how do I customize dialog to the detail page of an answer set?

删除回忆录丶 提交于 2021-02-10 06:15:22

问题


In a dialog file like

dialog (Result) {
  match: Content (this)

  template("Welcome!")
}

where Content is an an answer set and the user proceeds from browsing the answer set to each detail page, how do I customize so that the dialog is different for each mode -- list, summary, detail?

I am looking to do something along the lines of if mode = Detail then template = Content.text


回答1:


You can add this setting to your capsule.bxb file.

runtime-version (2) {
   overrides {
     allow-dialogs-on-detail-pages (true)
   }
 }

In your result-view, you can define your details dialog in the message section. For example:

 message {
   // A single result?
   if (size(this) == 1) {
       template (Details Dialog!!!)
     }
  }


来源:https://stackoverflow.com/questions/60133932/how-do-i-customize-dialog-to-the-detail-page-of-an-answer-set

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